CVE-2026-124540: JSON::XS versions before 4.05 for Perl allow stack exhaustion via nested tagged values under allow_tags in decode_tag Robert Rothenberg 14 Nov 2026 11:56 UTC

========================================================================
CVE-2026-124540                                      CPAN Security Group
========================================================================

         CVE ID:  CVE-2026-124540

   Distribution:  JSON-XS
       Versions:  before 4.05
       MetaCPAN:  https://metacpan.org/dist/JSON-XS
       VCS Repo:  https://cvs.schmorp.de/JSON-XS/

JSON::XS versions before 4.05 for Perl allow stack exhaustion via
nested tagged values under allow_tags in decode_tag

Description
-----------
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.

Problem types
-------------
- CWE-674 Uncontrolled Recursion

Solutions
---------
Upgrade to JSON-XS 4.05 or later.

References
----------
https://metacpan.org/release/MLEHMANN/JSON-XS-4.05/changes

Timeline
--------
- 2026-11-13: Version 4.05 released with fix.