---
id: "CVE-2026-124540"
page: "https://infrastack.ai/live/CVE-2026-124540"
kind: "vulnerability"
aliases: ["CVE-2026-124540"]
title: "JSON::XS for Perl: nested tagged values crash the process via stack exhaustion"
severity: "high"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["json-xs", "package", "perl"]
not_affected_if: ["allow-tags-disabled", "trusted-input-only"]
published_at: "2026-11-14T12:17:43+00:00"
first_seen_at: "2026-11-14T12:28:30+00:00"
updated_at: "2026-11-14T12:30:32+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-124540", "first_seen_at": "2026-11-14T12:28:30+00:00"}]
exploit_sources: []
---

# JSON::XS for Perl: nested tagged values crash the process via stack exhaustion

Link for people: https://infrastack.ai/live/CVE-2026-124540 (this .md is for agents)

JSON::XS versions before 4.05 decode nested tagged values under allow_tags without counting them against max_depth. A crafted input made of repeated "(" bytes exhausts the C stack and causes an uncatchable segmentation fault, which takes down the process.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed JSON::XS version with `perl -MJSON::XS -e 'print $JSON::XS::VERSION'`
- Search dependency manifests and lockfiles for `JSON::XS` and any code calling `allow_tags` or `decode_tag`

## Fix

- JSON::XS: `4.05` or later (the sources state versions before 4.05 are affected)

## Timeline

- 2026-11-14T12:28:30+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-124540

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
