NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2021-43307 — semver-regex

HIGHFix: sindresorhus/semver-regex@d8ba39a

CVE-2021-43307 is a high-severity (CVSS 7.5) CWE-1333 vulnerability in semver-regex. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for semver-regex — see the affected versions and patch details below.

Regular expression denial of service in semver-regex

Also known asGHSA-4x5v-gmq8-25ch
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
1 known
Exploitation data as of Oct 25, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.6%probability of exploitation in next 30 days
Lower Risk+0.03%
Lower risk than most CVEs75th percentile — riskier than 75% of all scored CVEsHighest risk
0.00%0.69%1.38%2.08%0.3%1.6%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

245other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
semver-regexnpm
15.1Mdownloads / week

Description

An exponential ReDoS (Regular Expression Denial of Service) can be triggered in the semver-regex npm package, when an attacker is able to supply arbitrary input to the test() method

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmsemver-regexall versions3.1.4npm install semver-regex@3.1.4
📦npmsemver-regex≥ 4.0.0&&< 4.0.34.0.3npm install semver-regex@4.0.3

Affected Products

1 product · 2 configurations
Application
semver-regexsemver-regex_project
≥ 4.0.0 && < 4.0.3
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for semver-regex, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update semver-regex to 3.1.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-43307 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

An exponential ReDoS (Regular Expression Denial of Service) can be triggered in the semver-regex npm package, when an attacker is able to supply arbitrary input to the test() method
O3 Security · Impact-Aware SCA

Is CVE-2021-43307 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-43307: semver-regex DoS — Fixed in 3.1.4