{"id":"CVE-2026-6104","published":"2026-05-10T04:35:17Z","modified":"2026-07-15T00:41:42Z","title":"Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding","vendor":"PHP","product":"PHP","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00469,"percentile":0.41455,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53","tags":["vendor-advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-6104","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2468573","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6104.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:22649","tags":["vendor-advisory","x_refsource_REDHAT"]}],"priority":{"score":12.7,"factors":[{"name":"EPSS percentile","points":8.29},{"name":"CVSS severity","points":4.41}]},"vendorSlug":"php","affectedVersions":[{"vendor":"PHP Group","product":"PHP","versions":[">= 8.4.*, < 8.4.21",">= 8.5.*, < 8.5.6"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-05-11T13:04:44.572023Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-28979","exploited":false,"provenance":"source"}}