Bug 2495089

Summary: CVE-2026-56018 perl-JavaScript-Minifier-XS: JavaScript::Minifier::XS: Denial of Service due to memory leak during minification. [fedora-all]
Product: [Fedora] Fedora Reporter: Jon Moroney <jmoroney>
Component: perl-JavaScript-Minifier-XSAssignee: Jitka Plesnikova <jplesnik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jplesnik, perl-devel
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["16b74fe8-e2ed-457d-a77f-9d5b24a6b1c9"]}
Fixed In Version: perl-JavaScript-Minifier-XS-0.16-1.fc45 perl-JavaScript-Minifier-XS-0.16-1.fc44 perl-JavaScript-Minifier-XS-0.16-1.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-07-01 05:32:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2494672    

Description Jon Moroney 2026-06-30 18:14:43 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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.