---
id: "CVE-2026-129115"
page: "https://infrastack.ai/live/CVE-2026-129115"
kind: "vulnerability"
aliases: ["CVE-2026-129115"]
title: "JSON::XS for Perl: freed stack memory read during object encoding"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["json-xs", "package", "perl"]
not_affected_if: ["allow-tags-unused", "no-freeze-methods"]
published_at: "2026-11-14T12:17:44+00:00"
first_seen_at: "2026-11-14T12:28:31+00:00"
updated_at: "2026-11-14T12:30:27+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129115", "first_seen_at": "2026-11-14T12:28:31+00:00"}]
exploit_sources: []
---

# JSON::XS for Perl: freed stack memory read during object encoding

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

JSON::XS versions from 3.0 before 4.05 read freed stack memory when encoding objects with FREEZE under allow_tags. An attacker who can get a crafted object encoded may read stray memory, and encode can silently return undef.

_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 `allow_tags` in code that calls JSON::XS encode on blessed objects that define FREEZE

## Fix

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

## Timeline

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

## From the sources

JSON::XS versions from 3.0 before 4.05 for Perl read freed stack memory when a FREEZE result's serialisation grows the Perl stack under allow_tags in encode_rv.

With allow_tags, an object's FREEZE method is called in list context and each returned value is encoded through a saved Perl stack pointer. When encoding a returned value calls back into Perl, through TO_JSON under convert_blessed or another FREEZE, and that callback grows the stack, the stack is reallocated while the saved pointer still refers to the freed block.

Encoding such objects reads freed memory, and encode can return undef without an error.

---

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