What’s Vulnerable › Vulnerabilities
GHSA-6chw-6frg-f759: Regular Expression Denial of Service in Acorn
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- Public exploit or detection template: none known
- Published: 2020-04-03 · updated 2021-08-23
- Weakness: CWE-400
Description
Affected versions of acorn are vulnerable to Regular Expression Denial of Service. A regex in the form of /[x-\ud800]/u causes the parser to enter an infinite loop. The string is not valid UTF16 which usually results in it being sanitized before reaching the parser. If an application processes untrusted input and passes it directly to acorn, attackers may leverage the vulnerability leading to Denial of Service.
Affected products
- Npm Acorn: from 5.5.0 before 5.7.4; from 6.0.0 before 6.4.1; from 7.0.0 before 7.1.1 — fixed in 5.7.4, 6.4.1, 7.1.1
How to fix
Upgrade to a fixed version: Npm Acorn 5.7.4, 6.4.1, 7.1.1. Check the vendor advisory for mitigations.
References
- https://github.com/acornjs/acorn/issues/929
- https://github.com/acornjs/acorn/commit/793c0e569ed1158672e3a40aeed1d8518832b802
- https://snyk.io/vuln/SNYK-JS-ACORN-559469
- https://www.npmjs.com/advisories/1488
Get alerted when GHSA-6chw-6frg-f759 or the next vulnerability affects your stack