CVE-2026-92842

OOB read / info leak in convert.* stream filters when line-break-chars contains NUL

Published Sep 25, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
The convert.base64-encode, convert.quoted-printable-encode and convert.quoted-printable-decode stream filters accept a line-break-chars option whose length is tracked separately from the string itself. The filter constructors duplicate the value with pestrdup(), which stops at the first NUL byte, while keeping the original length. When the filter later emits a line break it copies the recorded length out of the truncated allocation, reading past its end and placing adjacent heap bytes into the filter output.

Analysis

AI-generated

Technical impact

The vulnerability occurs in the convert.base64-encode, convert.quoted-printable-encode and convert.quoted-printable-decode PHP stream filters. A line-break-chars value that contains a NUL byte causes the filter constructor to duplicate the string with pestrdup(), which stops at the first NUL while keeping the original length. When the filter later emits a line break, it copies the recorded length out of the truncated allocation, reading past its end and copying adjacent heap bytes into the filter output. This out-of-bounds read can leak sensitive data such as credentials, private keys or other memory contents. The weakness is categorized as CWE-122 (Out-of-Bounds Read) and CWE-125 (Buffer Underrun).

Affected Systems

The affected component is the PHP interpreter, specifically the convert.base64-encode, convert.quoted-printable-encode and convert.quoted-printable-decode stream filters. The advisory lists PHP Group as the vendor. No specific PHP version numbers are provided, so any PHP build that includes these filters and has not been patched may be vulnerable.

Risk and Exploitability

The CVSS score of 5.9 indicates moderate risk. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The exploit would require the ability to supply a line-break-chars value containing a NUL byte to a PHP script that uses these stream filters. The likely attack vector is through web applications or scripts run under the PHP interpreter that accept user-provided input for the line-back-chars option. If an attacker controls that option, they can read adjacent heap memory; however, there is no known remote code execution or privilege escalation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PHP to a version that includes the fix for the out-of-bounds read in convert.* stream filters (see https://github.com/php/php-src/security/advisories/GHSA-88hq-2827-7pg6 for details).
  • Validate or strip NULL bytes from any line-break-chars values before passing them to the stream filter. Ensure input validation routines reject or sanitize NUL characters.
  • If the application does not require the line-break-chars option, remove its usage or disable the convert.* stream filters entirely in configuration or code.

Generated by OpenCVE AI on September 25, 2026 at 23:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4819-1 php8.2 security update
Debian DSA Debian DSA DSA-6514-1 php8.4 security update
Ubuntu USN Ubuntu USN USN-8936-1 PHP vulnerabilities
History
Type Values Removed Values Added
First Time appeared Php
Php php
CPEs cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
Vendors & Products Php
Php php
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Php Group
Php Group php
Vendors & Products Php Group
Php Group php
Type Values Removed Values Added
Description The convert.base64-encode, convert.quoted-printable-encode and convert.quoted-printable-decode stream filters accept a line-break-chars option whose length is tracked separately from the string itself. The filter constructors duplicate the value with pestrdup(), which stops at the first NUL byte, while keeping the original length. When the filter later emits a line break it copies the recorded length out of the truncated allocation, reading past its end and placing adjacent heap bytes into the filter output.
Title OOB read / info leak in convert.* stream filters when line-break-chars contains NUL
Weaknesses CWE-122
CWE-125
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
Sep 28, 2026, 1:31 PM
Reserved
Sep 17, 2026, 2:52 AM
Status
Analyzed
Published
Sep 25, 2026, 10:18 PM
Modified
Oct 27, 2026, 3:33 PM
Severity
Moderate
Public date
Sep 25, 2026, 9:11 PM