# CVE-2021-43307: Exponential ReDoS in semver-regex

- Severity: Medium 5.9 (CVSS:3.1, scored by JFROG) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.56%, higher than 75% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-06-01T16:47:38.625Z
- Modified: 2026-09-10T03:49:43.854Z
- Also known as: GHSA-4x5v-gmq8-25ch
- Weaknesses: CWE-1333
- Assigned by: JFROG

## 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

(As written by CVE List.)

## Affected

- semver-regex semver-regex: from unspecified before 3.1.4
- semver-regex (npm): before 3.1.4; from 4.0.0 before 4.0.3
- semver-regex_project semver-regex: before 3.1.4; from 4.0.0 before 4.0.3

## Every score

- JFROG: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: rating Low
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://research.jfrog.com/vulnerabilities/semver-regex-redos-xray-211349/> (exploit, third-party-advisory)
- <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)
- <https://research.jfrog.com/vulnerabilities/semver-regex-redos-xray-211349> (web)

## Sources

- CVE List: [CVE-2021-43307](https://www.cve.org/CVERecord?id=CVE-2021-43307), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-4x5v-gmq8-25ch](https://github.com/advisories/GHSA-4x5v-gmq8-25ch), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-43307](https://nvd.nist.gov/vuln/detail/CVE-2021-43307), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-43307 · Whole record: https://cve.day/CVE-2021-43307.json · Rebuilt by cve.day 2026-11-25T22:24:36.974Z
