CVE-2022-25858: Regular Expression Denial of Service (ReDoS)
Vulnerability summary
CVE-2022-25858 is a high (CVSS 7.5) vulnerability in terser. EPSS estimates a 3.25% chance of exploitation in the next 30 days, higher than 88.7% of scored vulnerabilities. 2 public exploits are recorded.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 15-07-2022PublishedVulnerability first disclosed.
- 16-09-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 6 sources · 1 version- CVE.orgCNA5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LDiffers
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · NpmEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- wordfenceSource3.7LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LDiffers
EPSS trend
Probability
3.25%
Chance of exploitation in the next 30 days
Percentile
89%
Versus all other CVEs
30-day change
No change 0.00 pp
From 3.25% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
2 foundExploit Reference (snyk.io)
Maturity: unknown
Exploit Reference (snyk.io)
Maturity: unknown
Weaknesses
CWE · root cause- CWE-1333Inefficient Regular Expression ComplexityThe product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.
- CWE-400Uncontrolled Resource ConsumptionThe product does not properly control the allocation and maintenance of a limited resource.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Wordpress8 products
- autoshare-for-twitter≤ 1.1.2 (fixed in 1.2.0)
- elasticpress≤ 4.2.2 (fixed in 4.3.0)
- maps-block-apple≤ 1.0.3 (fixed in 1.1.0)
- publisher-media-kit≤ 1.2.1 (fixed in 1.3.0)
- retro-winamp-block≤ 1.1.0 (fixed in 1.2.0)
Ubuntu2 products
- node-terserAll versions (No fix recorded)
- qt6-webengineAll versions (No fix recorded)
Debian1 product
- node-terser< 4.8.1-1
Npm1 product
- terser< 4.8.1 | ≥ 5.0.0, < 5.14.2
Terser1 product
- terser< 4.8.1 | ≥ 5.0.0, < 5.14.2
5 vendors · 13 products
References
12 links- snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2949722X Refsource MISCREPORTWEBExploitPatchThird Party Advisory
- github.com/terser/terser/blob/master/lib/compress/evaluate.js%23L135X Refsource MISCREPORTWEBBroken Link
- github.com/terser/terser/commit/a4da7349fdc92c05094f41d33d06d8cd4e90e76bX Refsource MISCREPORTWEBPatchThird Party Advisory
- github.com/terser/terser/commit/d8cc5691be980d663c29cc4d5ce67e852d597012X Refsource MISCREPORTWEBPatchThird Party Advisory
- github.com/terser/terserPACKAGE