# CVE-2026-129115: 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.

> Encoding objects with FREEZE under allow_tags in JSON::XS can read freed stack memory, causing crashes or memory disclosure in Perl apps.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Harmful if only installed:** No
- **Needs a specific call:** Yes (`encode_rv`, `convert_blessed`)
- **Fix available:** No
- **Published:** 14 Nov 2026
- **Updated:** 17 Nov 2026
- **Also known as:** DEBIAN-CVE-2026-129115, GHSA-w99q-7mg2-3mhx, UBUNTU-CVE-2026-129115

## What is CVE-2026-129115?

CVE-2026-129115 is a critical use after free vulnerability, published on 14 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2026-129115?

An affected version is only exploitable if your software calls encode_rv or convert_blessed. Many projects that include it are not exposed.


## How do I fix CVE-2026-129115?

No fix has been published for CVE-2026-129115 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-129115 being exploited?

There is no known exploitation of CVE-2026-129115 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-129115 and fix it if it is affected.

What it is: CVE-2026-129115 is a critical use after free vulnerability, published on 14 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-129115 in the wild and no public exploit code.
Exposure: An affected version is only exploitable if your software calls encode_rv or convert_blessed. Many projects that include it are not exposed.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
   If an affected version is present, also search the code for calls to encode_rv or convert_blessed and report whether any exist.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-129115/ (Markdown: https://insights.sbomify.com/CVE-2026-129115/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-129115
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-129115
- OSV: https://osv.dev/vulnerability/CVE-2026-129115

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-129115/
Summaries are generated and may contain mistakes; the official description above is the record.
