# CVE-2022-25858: Regular Expression Denial of Service (ReDoS)

- Severity: Medium 5.3 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- 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): 3.25%, higher than 88% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-07-15T20:00:19.590Z
- Modified: 2026-06-17T04:34:24.230Z
- Also known as: GHSA-4wf5-vphf-c2xc
- Weaknesses: CWE-1333
- Assigned by: snyk

## Description

The package terser before 4.8.1, from 5.0.0 and before 5.14.2 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure usage of regular expressions.

(As written by CVE List.)

## Affected

- terser: from unspecified before 4.8.1; from 5.0.0 before unspecified; from unspecified before 5.14.2
- terser (npm): before 4.8.1; from 5.0.0 before 5.14.2
- terser terser: before 4.8.1; from 5.0.0 before 5.14.2

## Every score

- snyk: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: 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:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://snyk.io/vuln/SNYK-JS-TERSER-2806366> (exploit, patch, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2949722> (exploit, patch, third-party-advisory, web)
- <https://github.com/terser/terser/blob/master/lib/compress/evaluate.js%23L135> (broken-link, web)
- <https://github.com/terser/terser/commit/a4da7349fdc92c05094f41d33d06d8cd4e90e76b> (patch, third-party-advisory, web)
- <https://github.com/terser/terser/commit/d8cc5691be980d663c29cc4d5ce67e852d597012> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25858> (advisory)
- <https://github.com/terser/terser> (package)

## Sources

- CVE List: [CVE-2022-25858](https://www.cve.org/CVERecord?id=CVE-2022-25858), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-4wf5-vphf-c2xc](https://github.com/advisories/GHSA-4wf5-vphf-c2xc), CC-BY-4.0, modified 2025-01-14
- NVD: [CVE-2022-25858](https://nvd.nist.gov/vuln/detail/CVE-2022-25858), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-25858 · Whole record: https://cve.day/CVE-2022-25858.json · Rebuilt by cve.day 2026-11-25T22:58:12.981Z
