JSON::XS versions before 4.05 for Perl leak the decoded key of an object rejected for a missing colon in decode_hv
JSON::XS versions before 4.05 for Perl leak the decoded key of an object rejected for a missing colon in decode_hv. Unless it is short plain ASCII, a quoted key is decoded into a new scalar. Nothing frees that scalar when the object is rejected for a missing ':' after the key. A process that keeps running after a failed decode retains one key per rejected document, with its size chosen by the sender. Repeated requests exhaust process memory.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS9.1critical · scored by CISA ADP · CWE-401
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 4.05
Fixed in 4.05
Mitigation
Upgrade to JSON-XS 4.05 or later.
References
- Release notes metacpan.org/release/MLEHMANN/JSON-XS-4.05/chang…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.