# CVE-2026-56017: Null dereference in JavaScript::Minifier::XS

> A remote attacker can crash a service using this Perl library by sending JavaScript input starting with a slash, causing a denial of service.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Jun 2026
- **Updated:** 29 Jun 2026
- **Also known as:** ALPINE-CVE-2026-56017, DEBIAN-CVE-2026-56017, GHSA-72fp-jmq3-p5xj, UBUNTU-CVE-2026-56017

## What is CVE-2026-56017?

CVE-2026-56017 is a high-severity vulnerability in GTERMARS JavaScript::Minifier::XS, published on 29 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-476 (NULL Pointer Dereference), CWE-125 (Out-of-bounds Read)

## Which versions are affected by CVE-2026-56017?


## How do I fix CVE-2026-56017?

Upgrade to a fixed version.

## Is CVE-2026-56017 being exploited?

There is no known exploitation of CVE-2026-56017 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-56017 and fix it if it is affected.

What it is: CVE-2026-56017 is a high-severity vulnerability in GTERMARS JavaScript::Minifier::XS, published on 29 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-56017 in the wild and no public exploit code.

Affected product: GTERMARS JavaScript::Minifier::XS. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-56017/ (Markdown: https://insights.sbomify.com/CVE-2026-56017/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-56017
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-56017
- OSV: https://osv.dev/vulnerability/CVE-2026-56017

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-56017/
Summaries are generated and may contain mistakes; the official description above is the record.
