HighGHSA-4wf5-vphf-c2xcCVE-2022-25858

Terser insecure use of regular expressions leads to ReDoS

Published 16 Jul 2022 · Updated 14 Jan 2025

Affected packages

Affected
<4.8.1
Fixed in
4.8.1
Update to the fixed version for your release line, for example:npm install terser@4.8.1
Affected
>=5.0.0 <5.14.2
Fixed in
5.14.2
Update to the fixed version for your release line, for example:npm install terser@5.14.2

Details

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.

Is GHSA-4wf5-vphf-c2xc in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected terser, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.