CVE-2026-56018: Memory leak in JavaScript::Minifier::XS minify()
CVE-2026-56018 is a denial-of-service vulnerability in JavaScript::Minifier::XS for Perl affecting versions before 0.16. The flaw is in the XS implementation of minify(), specifically in JsMinify (XS.xs). Cleanup logic frees only NodeSet structures but does not free the per-token contents buffers allocated in JsSetNodeContents, and JsDiscardNode unlinks nodes without freeing their contents. In addition, two early-return paths taken when the node list is empty leak the entire NodeSet. As a result, each call to minify() leaks memory, causing unbounded memory growth in long-lived processes that repeatedly minify JavaScript.
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.
Successful exploitation causes uncontrolled memory consumption in the vulnerable process. In long-lived applications such as asset pipelines or server-side JavaScript minifier endpoints, repeated calls to minify() can exhaust available memory, causing the process to be terminated or become unavailable, resulting in denial of service.
Mitigation
If you can’t patch tonight, do this now.
If immediate upgrade is not possible, reduce exposure by avoiding repeated use of the vulnerable minify() function in long-lived processes, isolating minification into short-lived worker processes, and enforcing process memory limits and restarts to prevent unbounded growth from causing broader service impact. These are compensating controls only; the proper fix is upgrading to 0.16 or later.
Remediation
Patch, then assume compromise.
Upgrade JavaScript::Minifier::XS to version 0.16 or later, which fixes the memory leak in minify() by correcting cleanup of token contents buffers and related leaked structures.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2026-56018 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2026-56018 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-56018?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2026-56018.
- Is there a patch for CVE-2026-56018?
- Upgrade JavaScript::Minifier::XS to version 0.16 or later, which fixes the memory leak in minify() by correcting cleanup of token contents buffers and related leaked structures.
- How severe is CVE-2026-56018?
- CVE-2026-56018 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 0.61% (43rd percentile) as of Sep 25, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.