CVE-2026-6104 json
Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding
published 2026-05-07 6 mo ago modified 2026-09-10 59 d ago also BIT-libphp-2026-6104 , BIT-php-2026-6104 , BIT-php-min-2026-6104 , EUVD-2026-28979 , GHSA-74r9-qxhc-fx53
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 40%
- public exploits
- 0
- none known
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.
Patch / fix
- bitnami libphp 8.4.21, 8.5.6
- bitnami php 8.4.21, 8.5.6
- bitnami php-min 8.4.21, 8.5.6
- PHP Group PHP 8.4.21, 8.5.6
- Red Hat Red Hat Enterprise Linux 10 0:8.4.21-1.el10_2
- php8.4 Debian 13 8.4.21-1~deb13u1
- php8.4 Debian 14 8.4.21-1
debian advisories DEBIAN-CVE-2026-6104
- php8.4 Ubuntu 25.10 8.4.11-1ubuntu1.2
- php8.5 Ubuntu 26.04 LTS 8.5.4-0ubuntu1.1
ubuntu advisories UBUNTU-CVE-2026-6104
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- php8.4 RHEL 10.2 8.4.21-1.el10_2
- php8.4-gd RHEL 10.2 8.4.21-1.el10_2
- php8.4-cli RHEL 10.2 8.4.21-1.el10_2
- php8.4-dba RHEL 10.2 8.4.21-1.el10_2
- php8.4-dbg RHEL 10.2 8.4.21-1.el10_2
- php8.4-ffi RHEL 10.2 8.4.21-1.el10_2
- php8.4-fpm RHEL 10.2 8.4.21-1.el10_2
- php8.4-gmp RHEL 10.2 8.4.21-1.el10_2
red hat advisories RHSA-2026:22649
- php8 openSUSE Tumbleweed 8.5.6-1.1
opensuse advisories openSUSE-SU-2026:10747-1
- php8.4 AlmaLinux 10 8.4.21-1.el10_2
- php8.4-gd AlmaLinux 10 8.4.21-1.el10_2
- php8.4-cli AlmaLinux 10 8.4.21-1.el10_2
- php8.4-dba AlmaLinux 10 8.4.21-1.el10_2
- php8.4-dbg AlmaLinux 10 8.4.21-1.el10_2
- php8.4-ffi AlmaLinux 10 8.4.21-1.el10_2
- php8.4-fpm AlmaLinux 10 8.4.21-1.el10_2
- php8.4-gmp AlmaLinux 10 8.4.21-1.el10_2
almalinux advisories ALSA-2026:22649
- php8.4 Rocky Linux 10 8.4.21-1.el10_2
rocky linux advisories RLSA-2026:22649
- php84 Alpine 3.22 8.4.27-r0
- php84 Alpine 3.23 8.4.21-r0
- php85 Alpine 3.24, Alpine 3.23 8.5.6-r0
alpine advisories ALPINE-CVE-2026-6104
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-6104 updated cvss 8.2
php: global buffer over-read in mb_convert_encoding() with attacker-supplied encoding
-
Red Hat Enterprise Linux AppStream (v. 10) php8.4 8.4.21-1.el10_2, php8.4-gd 8.4.21-1.el10_2, php8.4-cli 8.4.21-1.el10_2, php8.4-dba 8.4.21-1.el10_2, php8.4-dbg 8.4.21-1.el10_2, php8.4-ffi 8.4.21-1.el10_2, +18 morefixed: vendor fix RHSA-2026:22649
-
Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 more Red Hat Enterprise Linux 7 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +18 more Red Hat Enterprise Linux 8 php, libzip, php-gd, php-cli, php-dba, php-dbg, +30 more Red Hat Enterprise Linux 9 php, php-gd, php-cli, php-dba, php-dbg, php-ffi, +18 more Red Hat Enterprise Linux 10 php Red Hat Hardened Images phpnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 5 mo ago
Exploit prediction
0.47% chance of exploitation in the next 30 days, higher than 40% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 6.3 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:L/RE:M/U:Amber |
| CISA ADP | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| CNA | 4.0 | 6.3 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:M/U:Amber |
| NVD | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| OSV | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libphp | >=8.4.0, <8.4.21 >=8.5.0, <8.5.6 |
8.4.21 8.5.6 |
| bitnami | php | >=8.4.0, <8.4.21 >=8.5.0, <8.5.6 |
8.4.21 8.5.6 |
| bitnami | php-min | >=8.4.0, <8.4.21 >=8.5.0, <8.5.6 |
8.4.21 8.5.6 |
Affected products
- PHP Group PHP
- Red Hat Red Hat Enterprise Linux 10
- Red Hat Red Hat Enterprise Linux 6
- Red Hat Red Hat Enterprise Linux 7
- Red Hat Red Hat Enterprise Linux 8
- Red Hat Red Hat Enterprise Linux 9
- Red Hat Red Hat Hardened Images
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
- Technology feeds
References
-
github.com
/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53
vendor-advisory, advisory
-
access.redhat.com
/errata/RHSA-2026:22649
vendor-advisory, web
-
access.redhat.com
/security/cve/CVE-2026-6104
vdb-entry, web
-
bugzilla.redhat.com
/show_bug.cgi?id=2468573
issue-tracking, web
-
security.access.redhat.com
/data/csaf/v2/vex/2026/cve-2026-6104.json
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-6104
web
Sources
- CVE List CVE-2026-6104
- NVD CVE-2026-6104
- OSV BIT-libphp-2026-6104
- OSV BIT-php-2026-6104
- OSV BIT-php-min-2026-6104
- Maintainer advisory GHSA-74r9-qxhc-fx53
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of php/php-src published their own advisory on GitHub. Reviewed sources take precedence over it.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.