CVE-2026-6104: CWE-125 Out-of-bounds Read in PHP Group PHP
CVE-2026-6104 is a medium severity vulnerability in PHP versions 8. 4. * before 8. 4. 21 and 8. 5. * before 8. 5. 6. It involves an out-of-bounds read in mbstring functions when an encoding name containing an embedded NUL byte is processed.
AI Analysis
Technical Summary
The vulnerability arises in PHP's mbstring extension when encoding names with embedded NUL bytes are passed to certain functions. The code uses strncasecmp() to compare strings but incorrectly interprets a zero return value as indicating equal length, which is not guaranteed. This logic flaw leads to out-of-bounds reads of global memory, potentially causing application crashes or leaking information. The affected PHP versions are 8.4.* before 8.4.21 and 8.5.* before 8.5.6. Functions impacted include mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), mb_detect_order(), and the mbstring.detect_order and mbstring.http_output INI settings. The CVSS 4.0 score is 6.3, indicating medium severity. No patch or official remediation guidance is provided in the input.
Potential Impact
Successful exploitation can result in out-of-bounds reads of global memory, which may cause application crashes or information disclosure. The vulnerability affects multiple mbstring functions and related INI settings in PHP, potentially impacting applications relying on these functions for encoding operations. There are no known exploits in the wild as per the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the PHP Group vendor advisory for current remediation guidance. Since no official patch or remediation level is indicated, users should monitor for updates from the PHP Group and apply official fixes once available. Until then, consider avoiding passing encoding names with embedded NUL bytes to mbstring functions as a temporary precaution if feasible.
CVE-2026-6104: CWE-125 Out-of-bounds Read in PHP Group PHP
Description
CVE-2026-6104 is a medium severity vulnerability in PHP versions 8. 4. * before 8. 4. 21 and 8. 5. * before 8. 5. 6. It involves an out-of-bounds read in mbstring functions when an encoding name containing an embedded NUL byte is processed.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises in PHP's mbstring extension when encoding names with embedded NUL bytes are passed to certain functions. The code uses strncasecmp() to compare strings but incorrectly interprets a zero return value as indicating equal length, which is not guaranteed. This logic flaw leads to out-of-bounds reads of global memory, potentially causing application crashes or leaking information. The affected PHP versions are 8.4.* before 8.4.21 and 8.5.* before 8.5.6. Functions impacted include mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), mb_detect_order(), and the mbstring.detect_order and mbstring.http_output INI settings. The CVSS 4.0 score is 6.3, indicating medium severity. No patch or official remediation guidance is provided in the input.
Potential Impact
Successful exploitation can result in out-of-bounds reads of global memory, which may cause application crashes or information disclosure. The vulnerability affects multiple mbstring functions and related INI settings in PHP, potentially impacting applications relying on these functions for encoding operations. There are no known exploits in the wild as per the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the PHP Group vendor advisory for current remediation guidance. Since no official patch or remediation level is indicated, users should monitor for updates from the PHP Group and apply official fixes once available. Until then, consider avoiding passing encoding names with embedded NUL bytes to mbstring functions as a temporary precaution if feasible.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- php
- Date Reserved
- 2026-04-11T04:15:03.938Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a001cdccbff5d86104d92ae
Added to database: 5/10/2026, 5:51:24 AM
Last enriched: 5/10/2026, 6:06:33 AM
Last updated: 5/10/2026, 9:18:32 AM
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.