Description
JSON::XS versions before 4.05 for Perl leak the decoded part of a rejected long string in decode_str.
A string is decoded through a fixed-size buffer (16 KiB in 4.04), and each time the buffer fills its contents move into a new scalar. Nothing frees that scalar when the string is then rejected for a control character, an invalid escape, malformed UTF-8 or the end of the input.
A process that keeps running after a failed decode retains the decoded part of each rejected string, with its size chosen by the sender. Repeated requests exhaust process memory.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | JSON-XS | < 4.05 | 4.05 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libjson-xs-perl | 4.050-1 | — |
| Debian 13 | libjson-xs-perl | No fix yet | — |
| Debian 12 | libjson-xs-perl | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libjson-xs-perl | No fix yet | — |
| Ubuntu 26.04 LTS | libjson-xs-perl | No fix yet | — |
| Ubuntu 24.04 LTS | libjson-xs-perl | No fix yet | — |
| Ubuntu 22.04 LTS | libjson-xs-perl | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | libjson-xs-perl | No fix yet | — |
| Ubuntu Pro 18.04 LTS | libjson-xs-perl | No fix yet | — |
| Ubuntu Pro 16.04 LTS | libjson-xs-perl | No fix yet | — |
| Ubuntu Pro 14.04 LTS | libjson-xs-perl | No fix yet | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | perl-JSON-XS | 1:3.01-2.amzn2.0.2 | ALAS2-2026-4188 |
Advisories 1
- ALAS2-2026-4188 Important: perl-JSON-XS security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Dec 4, 2026