CVE-2022-25858
Regular Expression Denial of Service (ReDoS)
At a glance
- Severity
- MEDIUM 5.3
- EPSS
- EPSS 3.25 % · percentile 88 (2026-10-27)
- State
- PUBLISHED
- Published
- Updated
- Assigner
- snyk
- NVD status
- Modified
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.
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | snyk |
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | NVD · report@snyk.io (Secondary) |
| CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NVD · nvd@nist.gov (Primary) |
Weaknesses (CWE)
Advisories
- GHSA-4wf5-vphf-c2xc — Terser insecure use of regular expressions leads to ReDoS
European references
- ENISA EUVD · EUVD-2022-6234
- GCVE · GCVE-0-2022-25858
CERT-FR advisories
- CERTFR-2026-AVI-0109 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0969 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
- CERTFR-2023-AVI-0705 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
- CERTFR-2023-AVI-0428 — Multiples vulnérabilités dans les produits Splunk · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:terser:terser:*:*:*:*:*:node.js:*:*< 4.8.1cpe:2.3:a:terser:terser:*:*:*:*:*:node.js:*:*≥ 5.0.0 < 5.14.2
Affected products
| Product | Versions |
|---|---|
| terser | affected unspecified < 4.8.1 ; affected 5.0.0 < unspecified ; affected unspecified < 5.14.2 |
References
- https://snyk.io/vuln/SNYK-JS-TERSER-2806366
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2949722
- https://github.com/terser/terser/blob/master/lib/compress/evaluate.js%23L135
- https://github.com/terser/terser/commit/a4da7349fdc92c05094f41d33d06d8cd4e90e76b
- https://github.com/terser/terser/commit/d8cc5691be980d663c29cc4d5ce67e852d597012
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |