Skip to content
NewA calmer, faster ZeroHour

CVE-2026-124536

Memory exhaustion in JSON::XS incr_parse before 4.05

CVSS
—
EPSS
—
Published
·
Modified
Analyze CVE-2026-124536 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

JSON::XS before 4.05 mishandles incremental parsing in incr_parse. A NUL byte within the first max_size bytes is treated as the end of input, so the buffer grows without the size check firing, and incr_skip cannot drop the NUL. A peer streaming chunks to an incr_parse consumer can exhaust process memory regardless of max_size. Perl applications that parse untrusted incremental JSON with this module are affected.

What to do: Upgrade JSON::XS to 4.05.

ProductAffectedFixed in
JSON-XS JSON::XSbefore 4.054.05
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

JSON::XS versions before 4.05 for Perl allow memory exhaustion by buffering incremental input past max_size after a NUL byte in incr_parse. The parser appends each chunk to its buffer and compares max_size with how far it has progressed, not with the buffer length. It treats a NUL byte as the end of the input, so a NUL within the first max_size bytes keeps it short of the limit. The buffer keeps growing, and incr_skip cannot remove the NUL. A peer streaming data to an incr_parse consumer can exhaust process memory regardless of max_size.

Weakness
CWE-770

In the news

1 story