CPANSA-JavaScript-Minifier-XS-2026-56018: JavaScript-Minifier-XS vulnerability
| Publisher | giterlizzi | Document category | csaf_security_advisory |
|---|---|---|---|
| Initial release date | 2026-06-29T00:00:00 | Engine | CSAF Perl Toolkit 0.26 |
| Current release date | 2026-06-29T00:00:00 | Build Date | |
| Current version | 1 | Status | final |
| CVSS v3.1 Base Score | 7.5 | Severity | |
| Original language | Language | en | |
| Also referred to | |||
Vulnerability 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.
Vulnerabilities
CVE-2026-56018
Vulnerability DescriptionJavaScript::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.
| Weakness | CWE-400 : Uncontrolled Resource Consumption |
|---|
Product status
Known affected
| Product | Score | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| JavaScript-Minifier-XS less than 0.16 |
|
Fixed
- JavaScript-Minifier-XS greater than or equal 0.16
giterlizzi
Namespace: https://github.com/giterlizzi/
gdt@cpan.org
References
- CPANSA-JavaScript-Minifier-XS-2026-56018 JSON self
https://raw.githubusercontent.com/giterlizzi/perl-CPANSA-CSAF/develop/csaf/white/2026/cpansa-javascript-minifier-xs-2026-56018.json - https://github.com/bleargh45/JavaScript-Minifier-XS/issues/10 external
https://github.com/bleargh45/JavaScript-Minifier-XS/issues/10 - https://metacpan.org/release/GTERMARS/JavaScript-Minifier-XS-0.16/changes external
https://metacpan.org/release/GTERMARS/JavaScript-Minifier-XS-0.16/changes - http://www.openwall.com/lists/oss-security/2026/06/29/17 external
http://www.openwall.com/lists/oss-security/2026/06/29/17 - CVE-2026-56018 (NVD) external
https://nvd.nist.gov/vuln/detail/CVE-2026-56018
Revision history
| Version | Date of the revision | Summary of the revision |
|---|---|---|
| 1 | Mon Jun 29 00:00:00 2026 | First release |
Sharing rules
TLP:WHITE
For the TLP version see: https://www.first.org/tlp/