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.
Memory leak in JSON::XS before 4.05 on rejected keys
JSON::XS before 4.05 leaks memory in decode_hv when an object is rejected for a missing colon after a key. Unless the key is short plain ASCII, a quoted key becomes a scalar that is never freed. A sender who can submit JSON to a long-running process chooses the key size; each rejected document retains that key. Repeated requests can exhaust process memory.
What to do: Upgrade JSON::XS to 4.05. No workaround is stated.
| Product | Affected | Fixed in |
|---|---|---|
| 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 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.
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