---
id: "CVE-2026-124536"
page: "https://infrastack.ai/live/CVE-2026-124536"
kind: "vulnerability"
aliases: ["CVE-2026-124536"]
title: "JSON::XS for Perl: NUL byte lets streamed input exhaust memory"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["json-xs", "package", "perl"]
not_affected_if: ["no-incr-parse", "trusted-input-only"]
published_at: "2026-11-14T12:17:42+00:00"
first_seen_at: "2026-11-14T12:28:30+00:00"
updated_at: "2026-11-14T12:30:36+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-124536", "first_seen_at": "2026-11-14T12:28:30+00:00"}]
exploit_sources: []
---

# JSON::XS for Perl: NUL byte lets streamed input exhaust memory

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

JSON::XS versions before 4.05 for Perl keep buffering incremental input past the max_size limit once a NUL byte appears. A peer streaming data to an incr_parse consumer can exhaust the process memory.

_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'`
- Look for code calling `incr_parse` on data from untrusted peers

## Fix

- JSON::XS `4.05` or later (per the advisory's affected range: before 4.05)

## Timeline

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

## From the sources

JSON::XS versions before 4.05 for Perl allow memory exhaustion by buffering incremental input past max_size after a NUL byte in incr_parse.

The parser appends each chunk to its buffer and compares max_size with how far it has progressed, not with the buffer length. It treats a NUL byte as the end of the input, so a NUL within the first max_size bytes keeps it short of the limit. The buffer keeps growing, and incr_skip cannot remove the NUL.

A peer streaming data to an incr_parse consumer can exhaust process memory regardless of max_size.

---

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