Vulnerability · Published Jul 15, 2022 · Assigned by snyk
CVE-2022-25858Regular Expression Denial of Service (ReDoS)
Medium 5.3
In plain English
A medium-severity security flaw in terser. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 3.3% (higher than 88% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)3.3%top 11.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-terser | 4.8.1-1 | DEBIAN-CVE-2022-25858 |
| Debian:13 | node-terser | 4.8.1-1 | DEBIAN-CVE-2022-25858 |
| Debian:14 | node-terser | 4.8.1-1 | DEBIAN-CVE-2022-25858 |
| Ubuntu:22.04:LTS | node-terser | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:24.04:LTS | node-terser | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:25.10 | node-terser | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:26.04:LTS | node-terser | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:26.10 | node-terser | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:22.04:LTS | qt6-webengine | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:24.04:LTS | qt6-webengine | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:25.10 | qt6-webengine | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:26.04:LTS | qt6-webengine | no fix listed | UBUNTU-CVE-2022-25858 |
| Ubuntu:26.10 | qt6-webengine | no fix listed | UBUNTU-CVE-2022-25858 |
| npm | terser | 5.14.2 | GHSA-4wf5-vphf-c2xc |
| npm | terser | 4.8.1 | GHSA-4wf5-vphf-c2xc |
Affected products (as reported)
References
- https://snyk.io/vuln/SNYK-JS-TERSER-2806366 x_refsource_MISC
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2949722 x_refsource_MISC
- https://github.com/terser/terser/blob/master/lib/compress/evaluate.js%23L135 x_refsource_MISC
- https://github.com/terser/terser/commit/a4da7349fdc92c05094f41d33d06d8cd4e90e76b x_refsource_MISC
- https://github.com/terser/terser/commit/d8cc5691be980d663c29cc4d5ce67e852d597012 x_refsource_MISC