Memory leak in JSON::XS decode_str for rejected long strings
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA. Impact type from CWE-401.
Summary
JSON::XS versions before 4.05 for Perl fail to free the decoded part of a long string when decode_str rejects it. A process that keeps running after a failed decode retains each rejected string's decoded data, sized by the sender, so repeated requests can exhaust process memory. The flaw is classified as CWE-401 (memory not released after its useful lifetime).
Written with Claude Haiku 5.5 from the sources below · 2026-11-14
Description from the CNA
JSON::XS versions before 4.05 for Perl leak the decoded part of a rejected long string in decode_str. A string is decoded through a fixed-size buffer (16 KiB in 4.04), and each time the buffer fills its contents move into a new scalar. Nothing frees that scalar when the string is then rejected for a control character, an invalid escape, malformed UTF-8 or the end of the input. A process that keeps running after a failed decode retains the decoded part of each rejected string, with its size chosen by the sender. Repeated requests exhaust process memory.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | JSON-XS | before 4.05 | 4.05 | Patch available | CNA |
- JSON-XS Vendor— Affected before 4.05 Fixed in 4.05 Patch available CNA
Remediation
Upgrade JSON-XS to version 4.05 or later, which fixes the flaw.
Written with Claude Haiku 5.5 from the sources below · 2026-11-14
- Fix · CNA JSON-XS Fixed in 4.05
Timeline
- 2026-11-14 Threatist record created from CVE-2026-124541
- 2026-11-14 Alias added: GHSA-vgmh-4qpm-2xcv
References
Sources
- CVE-2026-124541 · CVE Program
- CVE-2026-124541 · NVD
- FIRST EPSS
- GHSA-vgmh-4qpm-2xcv · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences