HighGHSA-c2qf-rxjj-qqgwCVE-2022-25883

semver vulnerable to Regular Expression Denial of Service

Published 21 Jun 2023 · Updated 10 Sept 2026

Affected packages

Affected
>=7.0.0 <7.5.2
Fixed in
7.5.2
Update to the fixed version for your release line, for example:npm install semver@7.5.2
Affected
>=6.0.0 <6.3.1
Fixed in
6.3.1
Update to the fixed version for your release line, for example:npm install semver@6.3.1
Affected
>=2.0.0-alpha <5.7.2
Fixed in
5.7.2
Update to the fixed version for your release line, for example:npm install semver@5.7.2

Details

Versions of the package semver before 7.5.2 on the 7.x branch, before 6.3.1 on the 6.x branch, and all other versions before 5.7.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.

Is GHSA-c2qf-rxjj-qqgw in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected semver, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.