CVE-2025-40928: Integer Buffer Overflow in JSON::XS before 4.04
CVE-2025-40928 is an integer buffer overflow vulnerability in JSON::XS for Perl affecting versions prior to 4.04. When the library parses crafted JSON input, the flaw can trigger a segmentation fault due to incorrect buffer size handling during processing. The issue is classified as a heap-based buffer overflow. Successful exploitation can crash the consuming process and may have additional unspecified consequences depending on how the vulnerable parser is embedded and invoked.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
The primary confirmed impact is denial of service through process termination caused by a segmentation fault while parsing attacker-controlled JSON. Because the flaw is a heap-based buffer overflow, memory corruption beyond a simple crash may be possible, but no specific additional impact has been confirmed in the available information.
Mitigation
If you can’t patch tonight, do this now.
Reduce exposure by preventing untrusted or externally supplied JSON from reaching vulnerable JSON::XS parsers until the module is updated. Where feasible, isolate services that parse attacker-controlled JSON, add input validation and size constraints before parsing, and monitor for crashes in Perl applications that depend on JSON::XS. These measures are temporary and do not replace upgrading or patching.
Remediation
Patch, then assume compromise.
Upgrade JSON::XS to version 4.04 or later. Where immediate upgrade is not possible, apply the vendor-published patch for the affected pre-4.04 release and redeploy applications linked against the vulnerable module.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2025-40928 exploited in the wild?
- Yes. As of Sep 25, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2025-40928?
- Yes. As of Sep 25, 2026, Mallory has reports of a public exploit for CVE-2025-40928.
- Is there a patch for CVE-2025-40928?
- Upgrade JSON::XS to version 4.04 or later. Where immediate upgrade is not possible, apply the vendor-published patch for the affected pre-4.04 release and redeploy applications linked against the vulnerable module.
- How severe is CVE-2025-40928?
- CVE-2025-40928 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 0.70% (54th percentile) as of Sep 25, 2026.
Recent activity
6 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.