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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | perl-JavaScript-Minifier-XS | 0.160.0-1.1 | openSUSE-SU-2026:11158-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | perl-javascript-minifier-xs | 0.16-r0 | — |
Advisories 1
- openSUSE-SU-2026:11158-1 perl-JavaScript-Minifier-XS-0.160.0-1.1 on GA media SUSE / openSUSE Security Updates · Jul 1, 2026