CVE-2026-124541
Received Received - Intake

Memory Leak in JSON::XS Perl Module

Vulnerability report for CVE-2026-124541, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-14

Last updated on: 2026-11-14

Assigner: CPANSec

Description

JSON::XS versions before 4.05 for Perl leak the decoded part of a rejected long string in decode_str. A string is decoded through a fixed-size buffer (16 KiB in 4.04), and each time the buffer fills its contents move into a new scalar. Nothing frees that scalar when the string is then rejected for a control character, an invalid escape, malformed UTF-8 or the end of the input. A process that keeps running after a failed decode retains the decoded part of each rejected string, with its size chosen by the sender. Repeated requests exhaust process memory.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-14
Last Modified
2026-11-14
Generated
2026-11-15
AI Q&A
2026-11-14
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
perl json_xs to 4.05 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-401 The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the Perl module JSON::XS before version 4.05. When a long string is decoded and rejected due to issues like control characters or invalid UTF-8, the decoded portion remains in memory. Each rejected string adds to memory usage, which can exhaust system resources if the process continues running.

Detection Guidance

This vulnerability can be detected by checking the version of JSON::XS installed on your system. Run 'cpan JSON::XS' or 'perl -MJSON::XS -e "print $JSON::XS::VERSION"' to verify if the version is below 4.05. Additionally, monitor memory usage for processes using JSON::XS, as repeated failed decodes may cause memory exhaustion.

Impact Analysis

An attacker could send specially crafted long strings to a vulnerable system, causing memory exhaustion over time. This may lead to crashes, degraded performance, or denial-of-service conditions for applications using affected JSON::XS versions.

Compliance Impact

This vulnerability does not directly affect compliance with GDPR or HIPAA as it relates to memory exhaustion in a Perl module rather than data privacy or security controls. However, if exploited to cause denial-of-service, it could indirectly impact availability requirements under these standards.

Mitigation Strategies

Immediately update JSON::XS to version 4.05 or later using your package manager (e.g., 'cpan JSON::XS') or from the official Perl module repository. Restart any affected services to ensure the updated version is loaded. If immediate updates are not possible, consider isolating or terminating processes that frequently use JSON::XS to prevent memory exhaustion.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-124541. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...