CVE-2026-56018: CWE-401 Missing Release of Memory after Effective Lifetime in GTERMARS JavaScript::Minifier::XS
JavaScript::Minifier::XS versions before 0.16 for Perl leak memory on every call to minify(), allowing unbounded memory growth. In JsMinify (XS.xs) the cleanup frees only the NodeSet structures and never the per-token contents buffers allocated in JsSetNodeContents; JsDiscardNode unlinks nodes without freeing their contents. Each token's contents buffer is therefore leaked on every call, and the two early returns taken when the node list is empty leak the whole NodeSet. A long-lived process that minifies repeatedly, such as an asset pipeline or a server-side minifier endpoint, grows in memory without bound until it exhausts available memory and is killed, causing denial of service.
AI Analysis
Technical Summary
The vulnerability in JavaScript::Minifier::XS (prior to version 0.16) involves improper memory management in the JsMinify (XS.xs) component. Specifically, while NodeSet structures are freed during cleanup, the per-token content buffers allocated by JsSetNodeContents are never released. Additionally, JsDiscardNode unlinks nodes without freeing their contents buffers. This results in a memory leak on every call to minify(), and early returns when the node list is empty leak the entire NodeSet. Consequently, long-lived processes that repeatedly invoke minify() experience unbounded memory growth, potentially leading to denial of service due to memory exhaustion.
Potential Impact
Unbounded memory growth in affected versions can cause long-running processes using JavaScript::Minifier::XS to exhaust system memory, resulting in process termination and denial of service. There is no indication of remote code execution or data corruption, but service availability is impacted.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using affected versions in long-lived processes that repeatedly call minify(), or restart such processes regularly to mitigate memory exhaustion.
CVE-2026-56018: CWE-401 Missing Release of Memory after Effective Lifetime in GTERMARS JavaScript::Minifier::XS
Description
JavaScript::Minifier::XS versions before 0.16 for Perl leak memory on every call to minify(), allowing unbounded memory growth. In JsMinify (XS.xs) the cleanup frees only the NodeSet structures and never the per-token contents buffers allocated in JsSetNodeContents; JsDiscardNode unlinks nodes without freeing their contents. Each token's contents buffer is therefore leaked on every call, and the two early returns taken when the node list is empty leak the whole NodeSet. A long-lived process that minifies repeatedly, such as an asset pipeline or a server-side minifier endpoint, grows in memory without bound until it exhausts available memory and is killed, causing denial of service.
CVSS v3.1
Score 7.5high
Affected software
pkg:github/JavaScript-Minifier-XSRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in JavaScript::Minifier::XS (prior to version 0.16) involves improper memory management in the JsMinify (XS.xs) component. Specifically, while NodeSet structures are freed during cleanup, the per-token content buffers allocated by JsSetNodeContents are never released. Additionally, JsDiscardNode unlinks nodes without freeing their contents buffers. This results in a memory leak on every call to minify(), and early returns when the node list is empty leak the entire NodeSet. Consequently, long-lived processes that repeatedly invoke minify() experience unbounded memory growth, potentially leading to denial of service due to memory exhaustion.
Potential Impact
Unbounded memory growth in affected versions can cause long-running processes using JavaScript::Minifier::XS to exhaust system memory, resulting in process termination and denial of service. There is no indication of remote code execution or data corruption, but service availability is impacted.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using affected versions in long-lived processes that repeatedly call minify(), or restart such processes regularly to mitigate memory exhaustion.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-06-18T11:27:09.117Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a42d3d527e9c7971972d1c2
Added to database: 06/29/2026, 20:21:41 UTC
Last enriched: 06/29/2026, 20:36:28 UTC
Last updated: 06/29/2026, 21:06:43 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.