Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- Low · None · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA PHP (PHP Group) Fixed in 8.4.21, 8.5.6
Red Hat 1 advisory
- RHSA-2026:22649 Released 2026-06-02 · Red Hat rating Importantphp8.4 security update
- Red Hat Enterprise Linux AppStream (v. 10) php8.4-8.4.21-1.el10_2, php8.4-bcmath-8.4.21-1.el10_2, php8.4-cli-8.4.21-1.el10_2 +22
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
PHP 8.4.21, 8.5.6
2 records Highest priority Priority LOW 2 LOW
Other records, highest priority first
- TI-2026-06377 DoS attack via DOMNode::C14N()Priority LOW 34
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | RHSA-2026:22649 |
Not affected: 6 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Hardened Images
Timeline
- 2026-10-02 Threatist record created from CVE-2026-6104
References
More PHP Group vulnerabilities
- TI-2024-04260 Argument Injection in PHP-CGI KEVCVSS 3.1CRITICAL 9.8
- TI-2026-78794 PHP remote code execution via stale global state KEVCVSS 4.0CRITICAL 9.2
- TI-2026-78793 Out-of-memory handling flaw in PHP allows remote code execution KEVCVSS 4.0CRITICAL 9.2
- TI-2024-01743 Command injection via array-ish $command parameter of proc_open() CVSS 3.1CRITICAL 9.4
- TI-2022-13555 PDO::quote() may return unquoted string CVSS 3.1CRITICAL 9.1
- TI-2024-10408 Reference counting in php_request_shutdown causes Use-After-Free CVSS 4.0CRITICAL 9.2
Sources
- CVE-2026-6104 · CVE Program
- CVE-2026-6104 · NVD
- FIRST EPSS
- CVE-2026-6104 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences