{"id":"CVE-2026-6104","aliases":["CVE-2026-6104","BIT-LIBPHP-2026-6104","BIT-PHP-2026-6104","BIT-PHP-MIN-2026-6104","GHSA-74r9-qxhc-fx53"],"related":[],"kind":"vulnerability","state":"published","title":"Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding","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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En versiones de PHP 8.4.* anteriores a 8.4.21 y 8.5.* anteriores a 8.5.6, cuando un nombre de codificación que contiene un byte NUL incrustado se pasa a mb_convert_encoding() o funciones mbstring relacionadas, el código asume incorrectamente que cuando strncasecmp() devuelve 0 significa que las cadenas tienen la misma longitud. Esto puede llevar a una lectura fuera de límites de la memoria global, lo que podría causar un fallo o revelación de información o un fallo. Las funciones afectadas incluyen mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables() y mb_detect_order(), así como las configuraciones INI mbstring.detect_order y mbstring.http_output.","source":"nvd"}],"published":"2026-05-10T04:35:17.328Z","modified":"2026-11-11T02:55:53.626Z","severity":{"scorer":"php","scheme":"CVSS: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","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"php","scheme":"CVSS: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","score":6.3,"rating":"MEDIUM"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","score":8.2,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"semver","introduced":"8.4.*","fixed":"8.4.21","status":"affected"},{"type":"semver","introduced":"8.5.*","fixed":"8.5.6","status":"affected"}],"vendor":"PHP Group","product":"PHP","package":"mbstring","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:8.4.21-1.el10_2","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"php8.4","cpe":"cpe:/o:redhat:enterprise_linux:10.2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"php","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 6","package":"php","cpe":"cpe:/o:redhat:enterprise_linux:6","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","package":"php","cpe":"cpe:/o:redhat:enterprise_linux:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"php:7.4/php","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"php:8.2/php","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"php","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"php:8.2/php","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"php:8.3/php","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Hardened Images","package":"php","cpe":"cpe:/a:redhat:hummingbird:1","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"8.4.0","fixed":"8.4.21"},{"status":"affected","introduced":"8.5.0","fixed":"8.5.6"}],"vendor":"php","product":"php","cpe":"cpe:2.3:a:php:php:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"8.4.0","status":"affected","fixed":"8.4.21"},{"type":"semver","introduced":"8.5.0","status":"affected","fixed":"8.5.6"}],"ecosystem":"Bitnami","package":"libphp","purl":"pkg:bitnami/libphp","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"8.4.0","status":"affected","fixed":"8.4.21"},{"type":"semver","introduced":"8.5.0","status":"affected","fixed":"8.5.6"}],"ecosystem":"Bitnami","package":"php","purl":"pkg:bitnami/php","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"8.4.0","status":"affected","fixed":"8.4.21"},{"type":"semver","introduced":"8.5.0","status":"affected","fixed":"8.5.6"}],"ecosystem":"Bitnami","package":"php-min","purl":"pkg:bitnami/php-min","source":"bitnami"}],"references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53","tags":["advisory","vendor-advisory"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-6104","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2468573","tags":["issue-tracking","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6104.json","tags":["web","x-sadp-csaf-vex"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://access.redhat.com/errata/RHSA-2026:22649","tags":["vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-6104","tags":["web"],"sources":["bitnami"]}],"credits":["Akshay Jain","Ilija Tovilo"],"assigner":"php","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-05-11T13:04:44.572Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-6104","url":"https://www.cve.org/CVERecord?id=CVE-2026-6104","licence":"CVE Terms of Use","modified":"2026-07-15T00:41:42.455Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-6104","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-6104","licence":"Public domain","modified":"2026-07-24T08:10:00.150Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-LIBPHP-2026-6104","url":"https://osv.dev/vulnerability/BIT-LIBPHP-2026-6104","licence":"Apache-2.0","modified":"2026-11-11T02:55:53.626Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PHP-2026-6104","url":"https://osv.dev/vulnerability/BIT-PHP-2026-6104","licence":"Apache-2.0","modified":"2026-11-11T02:55:53.626Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PHP-MIN-2026-6104","url":"https://osv.dev/vulnerability/BIT-PHP-MIN-2026-6104","licence":"Apache-2.0","modified":"2026-11-11T02:55:53.626Z"}],"updatedAt":"2026-11-25T22:59:21.171Z","epss":{"score":0.00469,"percentile":0.4221,"date":"2026-12-01T12:00:22.000Z"}}