# CVE-2026-9496: pacote is vulnerable to Denial of Service (DoS) via the addGitSha function

> An attacker can cause denial of service in the pacote library by supplying a crafted spec value that triggers excessive CPU consumption.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 May 2026
- **Updated:** 7 Jul 2026
- **Also known as:** CLEANSTART-2026-AI21372, CLEANSTART-2026-HY69996, CLEANSTART-2026-QH29658, CLSA-2026-1787859798, CLSA-2026-1787916402, CLSA-2026-1788781526, CLSA-2026-1790108841, CLSA-2026-1790171653, CLSA-2026-1790190327, CLSA-2026-1790201054, CLSA-2026-1790673431, CLSA-2026-1791840472, CLSA-2026-1791841538, CLSA-2026-1792163599, CLSA-2026-1792475534, CLSA-2026-1792493763, DEBIAN-CVE-2026-9496, GHSA-w4pp-8pjf-rmxw, MINI-2v4m-c453-4qhg, MINI-66pc-2cp6-x533, MINI-6f73-7cpc-x9h4, MINI-pmhf-jm4r-g23g, MINI-qjrj-4fgc-fqfc, MINI-v8j9-hfc8-9p69, MINI-whpr-9m6v-jq5h, RHSA-2026:72116, ROOT-APP-NPM-CVE-2026-9496, UBUNTU-CVE-2026-9496

## What is CVE-2026-9496?

CVE-2026-9496 is a high-severity denial of service vulnerability in org.webjars.npm:pacote, published on 26 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Versions of the package pacote from 11.2.7 and before 21.5.1 are vulnerable to Denial of Service (DoS) via the addGitSha function. An attacker can exploit this vulnerability by supplying a specially crafted spec.rawSpec value that triggers the function’s regex replacement and string-manipulation logic,  causing excessive CPU consumption and potentially stalling or crashing the process.

Weakness: CWE-400 (Uncontrolled Resource Consumption), CWE-1333 (Inefficient Regular Expression Complexity)

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

2 open source packages ship an affected version, including pacote.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pacote` | npm | From 11.2.7 | 21.5.1 |
| `pacote` | npm | From 11.2.7 | 21.5.1 |
| `grafana12.4` | Red Hat:hummingbird:1 | All versions | 0:12.4.10-0.8.hum1 |

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

Upgrade pacote to 21.5.1 or later.

## Is CVE-2026-9496 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-9496 exists.

## Fix prompt for AI coding agents

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

What it is: CVE-2026-9496 is a high-severity denial of service vulnerability in org.webjars.npm:pacote, published on 26 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-9496 exists.

Affected packages and fixed versions:
- pacote (npm): affected from 11.2.7; fixed in 21.5.1
- pacote (npm): affected from 11.2.7; fixed in 21.5.1

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-9496/ (Markdown: https://insights.sbomify.com/CVE-2026-9496/index.md)
```

## Sources

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

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