Advisory

GHSA-6chw-6frg-f759

Also known as: None

Summary

Regular Expression Denial of Service in Acorn

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-04-03 21:48 UTC
Modified
2021-08-23 15:10 UTC

Affected packages and fixes

acorn

npm · All systems

Affected

  • introduced 5.5.0, fixed 5.7.4 (semver)

Fixed versions

5.7.4

Fix

acorn

npm · All systems

Affected

  • introduced 6.0.0, fixed 6.4.1 (semver)

Fixed versions

6.4.1

Fix

acorn

npm · All systems

Affected

  • introduced 7.0.0, fixed 7.1.1 (semver)

Fixed versions

7.1.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences