Vendors › PHP
CVE-2026-6104
Medium (6.3) EPSS 0.6% PHP · mbstring
Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding
## Summary A global buffer over-read exists in mbfl_name2encoding_ex() (ext/mbstring/libmbfl/mbfl/mbfl_encoding.c, line 352), called from mb_convert_encoding(...) and other mbstring functions, when parsing encoding names with embedded NUL bytes. ## Root Cause In mbfl_name2encoding_ex, the MIME name search loop (line 352) uses: c if (strncasecmp((*encoding)->mime_name, name, name_len) == 0 && (*encoding)->mime_name[name_len] == '\0') { When name contains an embedded NUL byte (e.g., "UTF-8\x00AAAA..."), strncasecmp returns 0 after matching up to the NUL (since both strings have NUL at the same p
| Published | 2026-05-07 |
| Updated | 2026-05-07 |
| Affected | PHP versions < 8.4.21; PHP versions < 8.5.6 |
| Fix | Upgrade to 8.4.21, 8.5.6 (first fixed release per supported branch). |
| Vendor advisory | https://github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53 |
CVEs (1)
| CVE | CWE | Type | Impact | Links |
|---|---|---|---|---|
| CVE-2026-6104 | CWE-125 | Overflow | Code Execution | NVD · CVE.org · EUVD |
CWE, type and impact come from the NVD enrichment pass; unfilled rows are pending enrichment.
Same CVE in other advisories
- K000162838 — F5 · N/A (F5 products not affected) · 2026-08-07
PHP vulnerability CVE-2026-6104 - RHSA-2026:22649 — Red Hat · High (8.2) · 2026-06-02
Red Hat Security Advisory: php8.4 security update
Open in the CVEMesh app Create a free account
Track this advisory against your own stack — add your assets and CVEMesh shows which advisories actually apply to the versions you run.
CVEMesh aggregates public vendor advisories as guidance; always verify against the vendor's official advisory before patching or upgrading.