2026-09-25 21:11CVE-2026-92842php
PUBLISHED5.2CWE-122CWE-125

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

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.

Problem type

Affected products

PHP Group

PHP

< 8.2.34 - AFFECTED

< 8.3.35 - AFFECTED

< 8.4.26 - AFFECTED

< 8.5.11 - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-92842
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-92842",
    "assignerOrgId": "dd77f84a-d19a-4638-8c3d-a322d820ed2b",
    "assignerShortName": "php",
    "dateUpdated": "2026-09-25T21:11:57.236Z",
    "dateReserved": "2026-09-17T02:52:30.905Z",
    "datePublished": "2026-09-25T21:11:57.236Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "dd77f84a-d19a-4638-8c3d-a322d820ed2b",
        "shortName": "php",
        "dateUpdated": "2026-09-25T21:11:57.236Z"
      },
      "title": "OOB read / info leak in convert.* stream filters when line-break-chars contains NUL",
      "descriptions": [
        {
          "lang": "en",
          "value": "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.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "<p>The <code>convert.base64-encode</code>, <code>convert.quoted-printable-encode</code> and <code>convert.quoted-printable-decode</code> stream filters accept a <code>line-break-chars</code> option whose length is tracked separately from the string itself. The filter constructors duplicate the value with <code>pestrdup()</code>, 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.</p>"
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "PHP Group",
          "product": "PHP",
          "packageName": "ext-standard",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "8.2.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.2.34"
            },
            {
              "version": "8.3.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.3.35"
            },
            {
              "version": "8.4.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.4.26"
            },
            {
              "version": "8.5.*",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "8.5.11"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-122 Heap-based buffer overflow",
              "cweId": "CWE-122",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-125 Out-of-bounds read",
              "cweId": "CWE-125",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/php/php-src/security/advisories/GHSA-88hq-2827-7pg6",
          "tags": [
            "vendor-advisory"
          ]
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-100",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-100 Overflow Buffers"
            }
          ]
        }
      ],
      "metrics": [
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ],
          "cvssV3_1": {
            "version": "3.1",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
            "attackVector": "NETWORK",
            "attackComplexity": "HIGH",
            "privilegesRequired": "NONE",
            "userInteraction": "NONE",
            "scope": "UNCHANGED",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "NONE",
            "availabilityImpact": "NONE",
            "baseScore": 5.9,
            "baseSeverity": "MEDIUM"
          }
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "@geeknik (GitHub)",
          "type": "reporter"
        },
        {
          "lang": "en",
          "value": "Nora Dossche",
          "type": "remediation developer"
        },
        {
          "lang": "en",
          "value": "Jakub Zelenka",
          "type": "remediation reviewer"
        }
      ]
    }
  }
}