JavaScript::Minifier::XS versions before 0.16 for Perl leak memory on every call to minify(), allowing unbounded memory growth
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-56018
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 08:45 UTC · Revision 1
Source evidence
JavaScript::Minifier::XS versions before 0.16 for Perl leak memory on every call to minify(), allowing unbounded memory growth
core-osv · Original sourcePublished 29 Jun 2026, 19:38 UTC
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.
osv:CVE-2026-56018
Complete source record
{
"id": "4e3e9727db334424df7c36fe3d012c14048357d2381509850146dd708fdc4c6b",
"url": "https://osv.dev/vulnerability/CVE-2026-56018",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "JavaScript::Minifier::XS versions before 0.16 for Perl leak memory on every call to minify(), allowing unbounded memory growth",
"summary": "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.",
"evidence": "osv:CVE-2026-56018",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-56018",
"aliases": [
"CVE-2026-56018"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/bleargh45/javascript-minifier-xs",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "84461af21b2e433d5ed65c31d7d901cfae9dc7f4"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.16"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.16"
}
],
"source": "DESCRIPTION"
}
]
}
}
],
"versions": [
"v0.15",
"v0.14",
"v0.13",
"v0.12",
"v0.11",
"v0.10",
"v0.09",
"v0.08",
"v0.07",
"v0.06",
"v0.05",
"v0.04",
"v0.03",
"v0.02",
"v0.01",
"v0.01_05",
"v0.01_04",
"v0.01_03",
"v0.01_02",
"v0.01_01"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-56018.json"
}
}
],
"modified": "2026-10-28T02:30:27.197195543Z",
"provider": "osv",
"references": [
"https://cpan.org/modules",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56018.json",
"https://metacpan.org/release/GTERMARS/JavaScript-Minifier-XS-0.16/changes",
"https://nvd.nist.gov/vuln/detail/CVE-2026-56018",
"https://github.com/bleargh45/JavaScript-Minifier-XS/issues/10",
"https://github.com/bleargh45/JavaScript-Minifier-XS"
],
"provider_metadata": {
"cwe_ids": [
"CWE-400",
"CWE-401"
],
"cna_assigner": "CPANSec",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56018.json"
}
},
"related_cves": [
{
"value": "CVE-2026-56018",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 493958,
"published_at": "2026-06-29T19:38:35.316+00:00"
}