# CVE-2026-6104: Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding

- Severity: Medium 6.3 (CVSS:4.0, scored by php) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Published: 2026-05-10T04:35:17.328Z
- Modified: 2026-11-11T02:55:53.626Z
- Also known as: BIT-LIBPHP-2026-6104, BIT-PHP-2026-6104, BIT-PHP-MIN-2026-6104, GHSA-74r9-qxhc-fx53
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: php

## 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.

(As written by CVE List.)

## Affected

- mbstring: from 8.4.* before 8.4.21; from 8.5.* before 8.5.6
- php8.4: no versions given (not affected: from 0:8.4.21-1.el10_2 before *)
- php: no versions given
- php:7.4/php: no versions given
- php:8.2/php: no versions given
- php:8.3/php: no versions given
- php php: from 8.4.0 before 8.4.21; from 8.5.0 before 8.5.6
- libphp (Bitnami): from 8.4.0 before 8.4.21; from 8.5.0 before 8.5.6
- php (Bitnami): from 8.4.0 before 8.4.21; from 8.5.0 before 8.5.6
- php-min (Bitnami): from 8.4.0 before 8.4.21; from 8.5.0 before 8.5.6

## Every score

- php: CVSS:4.0 6.3 Medium `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`
- redhat-SADP: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53> (advisory, vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2026-6104> (vdb-entry, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2468573> (issue-tracking, web)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6104.json> (web)
- <https://access.redhat.com/errata/RHSA-2026:22649> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-6104> (web)

## Sources

- CVE List: [CVE-2026-6104](https://www.cve.org/CVERecord?id=CVE-2026-6104), CVE Terms of Use, modified 2026-07-15
- NVD: [CVE-2026-6104](https://nvd.nist.gov/vuln/detail/CVE-2026-6104), Public domain, modified 2026-07-24
- Bitnami Vulnerability Database: [BIT-LIBPHP-2026-6104](https://osv.dev/vulnerability/BIT-LIBPHP-2026-6104), Apache-2.0, modified 2026-11-11
- Bitnami Vulnerability Database: [BIT-PHP-2026-6104](https://osv.dev/vulnerability/BIT-PHP-2026-6104), Apache-2.0, modified 2026-11-11
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2026-6104](https://osv.dev/vulnerability/BIT-PHP-MIN-2026-6104), Apache-2.0, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-6104 · Whole record: https://cve.day/CVE-2026-6104.json · Rebuilt by cve.day 2026-11-25T22:59:21.171Z
