CVE-2026-6104: Vulnerability in PHP
Critical. In PHP versions 8.4.* before 8.4.21 and 8.5.* before 8.5.6, when an encoding name containing an embedded NUL byte is passed to mb_convert_encoding() or related mbstring functions, the code incorrectly assumes that when strncasecmp() returns 0 it means the strings have the same length. This can lead to out-of-bounds read of global memory, potentially causing a crash or information disclosure or crash. Affected...
CWE-125
- Exploitation
- None confirmed
- Severity
- 9.1 of 10
- Attack likelihood
- Unknown
- Fix
- Fixed version known
- Patch deadline
- No deadline set
Details
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- Weakness
- CWE-125
- Published
- 10 May 2026
- Last change
- 24 Jul 2026
Affected products
Affected versions and the first fixed release
- PHP From 8.4.0 before 8.4.21; From 8.5.0 before 8.5.6. Fixed in 8.4.21, 8.5.6
Advisories
Vendor and security advisories
- github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53
- access.redhat.com/errata/RHSA-2026:22649
- access.redhat.com/security/cve/CVE-2026-6104
- bugzilla.redhat.com/show_bug.cgi
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6104.json
Related
- PHP vulnerabilities Recent advisories, watch this product