CVE-2021-43307 json
Exponential ReDoS in semver-regex
published 2022-06-01 4 y ago modified 2026-09-10 1 mo ago also GHSA-4x5v-gmq8-25ch , EUVD-2022-5926
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
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
Patch / fix
- npm semver-regex 3.1.4, 4.0.3
- semver-regex semver-regex 3.1.4, 4.0.3
Exploit prediction
1.56% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- research.jfrog.com https://research.jfrog.com/vulnerabilities/semver-regex-redos-xray-211349/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | semver-regex | <3.1.4 >=4.0.0, <4.0.3 |
3.1.4 4.0.3 |
Affected products
- semver-regex semver-regex
Classification
- Weakness
-
- CWE-1333 Inefficient Regular Expression Complexity
References
-
github.com
/sindresorhus/semver-regex/commit/d8ba39a528c1027c43ab23f12eec28ca4d40dd0c
web
-
research.jfrog.com
/vulnerabilities/semver-regex-redos-xray-211349/
exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-43307
advisory
-
github.com
/sindresorhus/semver-regex
package
-
research.jfrog.com
/vulnerabilities/semver-regex-redos-xray-211349
web
Sources
- CVE List CVE-2021-43307
- GitHub Advisory GHSA-4x5v-gmq8-25ch
- NVD CVE-2021-43307
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.