Npm · Pacote · CVE-2026-9496
**Name of the Vulnerable Software and Affected Versions**
pacote versions 11.2.7 and later
**Description**
A Regular Expression Denial of Service (ReDoS) exists in the `addGitSha()` function. An attacker can cause excessive CPU consumption, potentially stalling or crashing the process, by providing a specially crafted `spec.rawSpec` value. This occurs when the function's regex replacement and string-manipulation logic are triggered, pinning a CPU core. The issue is reachable by unauthenticated users wherever the library consumes user-controlled package specifications.
**Recommendations**
As a temporary mitigation, validate package specifications before passing them to the library.
At the moment, there is no information about a newer version that contains a fix for this vulnerability.