acorn@5.7.2 vulnerabilities

ECMAScript parser

Direct Vulnerabilities

Known vulnerabilities in the acorn package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Regular Expression Denial of Service (ReDoS)

acorn is a tiny, fast JavaScript parser written in JavaScript.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via a regex in the form of /[x-\ud800]/u, which causes the parser to enter an infinite loop.

This string is not a valid UTF16 and is therefore not sanitized before reaching the parser. An application which processes untrusted input and passes it directly to acorn, will allow attackers to leverage the vulnerability leading to a Denial of Service.

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade acorn to version 5.7.4, 6.4.1, 7.1.1 or higher.

>=5.5.0 <5.7.4 >=6.0.0 <6.4.1 >=7.0.0 <7.1.1