Vulnerability · CVE-2026-6104
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 mbstrin…
Published May 10, 2026 · catalog updated Jul 24, 2026 · the affected product
Check if you run it
No confirmed exploitation is on record for CVE-2026-6104. EPSS is 0.60%. Act only if a listed version of the affected product is installed.
Gaps on this record
- No plain product name is stored. The page cannot tell you which product to check.
- No version range is stored. A customer cannot check an installed version against this record.
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- Medium6.3
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.60%
- Remediation
- Advisory link
- Affected products
- cpe php/php
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.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- cpe php/phpversion unspecified
How to fix CVE-2026-6104
Recommended remediation
A patch or advisory reference is linked. Open the original publisher for availability by product version.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-6104. EPSS is 0.60%. Act only if a listed version of the affected product is installed.
Which versions are affected?
Affected version ranges are not on this record. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-125: Out-of-bounds Read. EPSS 0.60%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
May 10, 2026 · NIST NVD
Detected
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 cra
Jul 24, 2026 · NIST NVD
Updated
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 cra
Sources
- CVE.orgVulnerability recordCVE-2026-6104
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-6104
30-day exploitation probability 0.6%
first.org - NIST NVDVulnerability recordCVE-2026-6104
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 le
nvd.nist.gov
References
Freshness
Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.