---
id: "CVE-2026-124539"
page: "https://infrastack.ai/live/CVE-2026-124539"
kind: "vulnerability"
aliases: ["CVE-2026-124539"]
title: "JSON::XS for Perl leaks memory on malformed JSON objects"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["json-xs", "long-running-services", "package", "perl"]
not_affected_if: ["short-lived-scripts", "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:36+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-124539", "first_seen_at": "2026-11-14T12:28:30+00:00"}]
exploit_sources: []
---

# JSON::XS for Perl leaks memory on malformed JSON objects

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

JSON::XS before 4.05 for Perl does not free the decoded key when it rejects an object missing a colon after the key. A long-running process that keeps decoding untrusted input can have its memory exhausted by repeated bad documents.

_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 a JSON::XS entry below `4.05` in `cpanfile.snapshot`, `Makefile.PL` or `Build.PL` dependency lists
- Note whether the service keeps running after failed JSON decodes and accepts JSON from untrusted clients

## Fix

- JSON::XS: upgrade to `4.05` or later

## Timeline

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

## From the sources

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.

---

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