CVE-2022-25858Terser
High 7.5 No auth needed
Follow: this CVE · Terser · Terser We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 2.8% probability of exploitation in 30 days · percentile 87
- Auth required
- No
- Published
- Jul 15, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-1333
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Terser.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | terser |
< 4.8.1 |
4.8.1 |
npm install terser@4.8.1 |
| npm | terser |
≥ 5.0.0 < 5.14.2 |
5.14.2 |
npm install terser@5.14.2 |
Per OSV / GitHub Advisories (GHSA-4wf5-vphf-c2xc). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| terser | terser | < 4.8.1 |
| terser | terser | ≥ 5.0.0 < 5.14.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Broken Link
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory
- snyk.io Exploit Patch Third Party Advisory
- snyk.io Exploit Patch Third Party Advisory