CVE-2021-43307
HIGH 7.5CVSS 3.1Regular expression denial of service in semver-regex
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
- Published
- 2 Jun 2022
- Last modified
- 10 Sep 2026
- Assigned by
- reefs@jfrog.com
- NVD status
- Modified
- Weakness
- CWE-1333
- Also known as
- GHSA-4x5v-gmq8-25ch
- Sources
- NVDJSONOSV GHSA-4x5v-gmq8-25chJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | reefs@jfrog.com (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | semver-regex_project | semver-regexcpe:2.3:a:semver-regex_project:semver-regex:*:*:*:*:*:*:*:* |
< 3.1.4 | 3.1.4 |
| NVD | semver-regex_project | semver-regexcpe:2.3:a:semver-regex_project:semver-regex:*:*:*:*:*:*:*:* |
>= 4.0.0, < 4.0.3 | 4.0.3 |
| OSV | npm | semver-regex | < 3.1.4 | 3.1.4 |
| OSV | npm | semver-regex | >= 4.0.0, < 4.0.3 | 4.0.3 |
References
- https://research.jfrog.com/vulnerabilities/semver-regex-redos-xray-211349/ · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-43307 · ADVISORY
- https://github.com/sindresorhus/semver-regex/commit/d8ba39a528c1027c43ab23f12eec28ca4d40dd0c · WEB
- https://github.com/sindresorhus/semver-regex · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 2 Jun 2022)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 3 Jun 2022)