Skip to content
OpenAdvisories
High · 7.5 CVE-2026-56017 EUVD-2026-40181GHSA-72fp-jmq3-p5xj

JavaScript::Minifier::XS versions before 0.16 for Perl crash with a NULL pointer dereference when the first meaningful token of the input is a slash

Published Jun 29, 2026 · Updated Jun 29, 2026 · Assigned by CPANSec

Description

JavaScript::Minifier::XS versions before 0.16 for Perl crash with a NULL pointer dereference when the first meaningful token of the input is a slash.

The regexp versus division disambiguator in JsTokenizeString (XS.xs) inspects the previous token's last byte to choose between a regexp literal and a division operator. When a slash is the first meaningful token, with the start of input or only whitespace and comments before it, there is no valid preceding token: the walk back over whitespace and comment nodes runs off the head of the node list to NULL, and the byte lookup reads through a NULL contents pointer at an underflowed length index. The following identifier check dereferences the same NULL pointer.

The crash is reachable through the public minify() API, so input as small as a single slash byte crashes the calling process. A service that minifies untrusted or third-party JavaScript can be crashed by a remote request, causing denial of service.

Affected products

VendorProductAffectedFixed
GTERMARS JavaScript::Minifier::XS < 0.16 0.16

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libjavascript-minifier-xs-perl 0.16-1 —
Debian 13 libjavascript-minifier-xs-perl No fix yet —
Debian 12 libjavascript-minifier-xs-perl No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libjavascript-minifier-xs-perl No fix yet —
Ubuntu 26.04 LTS libjavascript-minifier-xs-perl No fix yet —
Ubuntu 25.10 libjavascript-minifier-xs-perl No fix yet —
Ubuntu 24.04 LTS libjavascript-minifier-xs-perl No fix yet —
Ubuntu 22.04 LTS libjavascript-minifier-xs-perl No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS libjavascript-minifier-xs-perl No fix yet —
Ubuntu 18.04 LTS libjavascript-minifier-xs-perl No fix yet —
Ubuntu 16.04 LTS libjavascript-minifier-xs-perl No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed perl-JavaScript-Minifier-XS 0.160.0-1.1 openSUSE-SU-2026:11158-1
ReleasePackageFixed inAdvisory
Alpine v3.24 perl-javascript-minifier-xs 0.16-r0 —

Advisories 1

References