VDB

CVE-2026-6104

CVE-2026-6104 PUBLISHED CVSS 6.3 MEDIUM

Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding

Reported by php · Published May 10, 2026

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.

EPSS 0.47% · 41.5th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
php8.4-enchanterrata.rockylinux.org8.4.21-1.el10
php8.4-pgsqlerrata.rockylinux.org8.4.21-1.el10
php8.4-odbc-debuginfoerrata.rockylinux.org8.4.21-1.el10
php8.4-soapAmazon Linux8.4.21-1.amzn2023.0.1
php8.4-gmperrata.rockylinux.org8.4.21-1.el10
php8.4-mysqlnderrata.rockylinux.org8.4.21-1.el10
php8.4-modphpAmazon Linux8.4.21-1.amzn2023.0.1
php8.4-ldap-debuginfoerrata.rockylinux.org8.4.21-1.el10
php8.4-fpm-debuginfoerrata.rockylinux.org8.4.21-1.el10
php8.4-gmp-debuginfoerrata.rockylinux.org8.4.21-1.el10
php8.4-ffierrata.rockylinux.org8.4.21-1.el10
php8.4-bcmatherrata.rockylinux.org8.4.21-1.el10

53 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 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
EPSS Score
0.47%
41.5th percentile

Affected products

VendorProductVersions
PHP GroupPHP8.4.*, 8.5.*
PHP GroupPHP8.4.*, 8.5.*

Timeline

  • May 7, 2026 CVE Published
  • May 8, 2026 PoC Published
  • May 10, 2026 EPSS Score (30 in total, the first dated here)
  • May 11, 2026 Security Advisory (13 in total, the first dated here)
  • Jun 3, 2026 Distribution Patch (11 in total, the first dated here)
  • Aug 10, 2026 Coalition ESS Score
  • Aug 10, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-6104
vulnetix vdb fixes CVE-2026-6104

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-6104/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

  • vendor-advisory
Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›