JSON::XS before 4.05 has seven CVEs, including memory exhaustion
Named issues include a decoded-key leak, stack exhaustion, and incremental-parse memory exhaustion.
Stack exhaustion in JSON::XS before 4.05 with allow_tags
JSON::XS for Perl before 4.05 does not count nested tagged values against max_depth in decode_tag when allow_tags is on. A caller who supplies a run of "(" bytes can recurse until the C stack is exhausted, causing an uncatchable segmentation fault. Applications that decode untrusted JSON with allow_tags enabled are affected.
What to do: Upgrade JSON::XS to 4.05.
| Product | Affected | Fixed in |
|---|---|---|
| Perl JSON::XS | before 4.05 | 4.05 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
JSON::XS versions before 4.05 for Perl allow stack exhaustion via nested tagged values under allow_tags in decode_tag. With allow_tags, "(" starts a tagged value. Its tag and value are decoded recursively, and each can start another tagged value. Unlike arrays and objects, this nesting is not counted against max_depth. A run of "(" bytes exhausts the C stack and triggers an uncatchable segmentation fault regardless of max_depth.
Named issues include a decoded-key leak, stack exhaustion, and incremental-parse memory exhaustion.
Today 106 readers · 106 views · 22 reads · all time 199K views