Critical severity · published May 10, 2026
CVE-2026-6104
Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding
9.1
CVSS
0.5%
EPSS
No
On KEV
Description
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 functions include mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), and mb_detect_order(), as well as the mbstring.detect_order and mbstring.http_output INI settings.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 40% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PH
PHP · PHP
8.4.* before 8.4.21; 8.5.* before 8.5.6 · source: vendor, NVD
RH
Red Hat Enterprise Linux 10 · Red Hat
All versions, or not specified · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-6104
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-6104
Vendor Advisory
https://github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:22649
access.redhat.com
https://access.redhat.com/security/cve/CVE-2026-6104
bugzilla.redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=2468573
security.access.redhat.com
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6104.json
More from PHP
9.8
CVE-2026-109618
RCE via OOM corruption
9.8
CVE-2024-4577
Argument Injection in PHP-CGI
9.8
CVE-2019-11043
Underflow in PHP-FPM can lead to RCE
9.8
CVE-2016-10033
The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute…
9.8
CVE-2012-1823
PHP-CGI Query String Parameter Vulnerability
