Use after free in JSON::XS for Perl when encoding FREEZE results
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
JSON::XS versions from 3.0 before 4.05 for Perl read freed stack memory during encoding. When a FREEZE method's returned values trigger a Perl callback that grows the stack, the saved stack pointer refers to a freed block (CWE-416). Encoding such objects with allow_tags can return undef without an error.
Written with Claude Haiku 5.5 from the sources below · 2026-11-14
Description from the CNA
JSON::XS versions from 3.0 before 4.05 for Perl read freed stack memory when a FREEZE result's serialisation grows the Perl stack under allow_tags in encode_rv. With allow_tags, an object's FREEZE method is called in list context and each returned value is encoded through a saved Perl stack pointer. When encoding a returned value calls back into Perl, through TO_JSON under convert_blessed or another FREEZE, and that callback grows the stack, the stack is reallocated while the saved pointer still refers to the freed block. Encoding such objects reads freed memory, and encode can return undef without an error.
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 | 3.0 to before 4.05 | 4.05 | Patch available | CNA |
- JSON-XS Vendor— Affected 3.0 to 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-129115
- 2026-11-14 Alias added: GHSA-w99q-7mg2-3mhx
References
Sources
- CVE-2026-129115 · CVE Program
- CVE-2026-129115 · NVD
- FIRST EPSS
- GHSA-w99q-7mg2-3mhx · 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