# CVE-2021-3795: Inefficient Regular Expression Complexity in sindresorhus/semver-regex

- Severity: High 7.5 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:N/AC:L/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.52%, higher than 75% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-09-15T16:23:49.000Z
- Modified: 2026-09-10T03:49:27.232Z
- Also known as: GHSA-44c6-4v22-4mhx
- Weaknesses: CWE-400, CWE-1333
- Assigned by: @huntrdev

## Description

semver-regex is vulnerable to Inefficient Regular Expression Complexity

(As written by CVE List.)

## Affected

- sindresorhus sindresorhus/semver-regex: from unspecified before 4.0.1; from unspecified before 3.1.3 (not affected: 3.1.3)
- semver-regex (npm): before 3.1.3; from 4.0.0 before 4.0.1
- semver-regex_project semver-regex: before 3.1.3; 4.0.0

## Every score

- @huntrdev: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- 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://huntr.dev/bounties/006624e3-35ac-448f-aab9-7b5183f30e28> (exploit, patch, third-party-advisory, web)
- <https://github.com/sindresorhus/semver-regex/commit/11c66245f4e1976dccc52977ed183696a21a3fd7> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3795> (advisory)
- <https://github.com/sindresorhus/semver-regex> (package)

## Sources

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

---

Page: https://cve.day/CVE-2021-3795 · Whole record: https://cve.day/CVE-2021-3795.json · Rebuilt by cve.day 2026-11-25T22:58:03.990Z
