GHSA-6chw-6frg-f759: Acorn Denial of Service Vulnerability
HIGHGHSA-6chw-6frg-f759 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Acorn libraries in the npm ecosystem. The issue involves regular expression denial of service in acorn. Remediation is available by upgrading affected packages to version 5.7.4, 6.4.1, 7.1.1.
GHSA-6chw-6frg-f759 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix GHSA-6chw-6frg-f759
To remediate this vulnerability, upgrade all affected Acorn dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install acorn@5.7.4
npm install acorn@6.4.1
npm install acorn@7.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls acorn
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-6chw-6frg-f759, inspect your project dependencies using npm:
npm ls acorn
Analyze the terminal output to locate any version of Acorn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.7.4), your application is affected.
Note: The npm ls acorn command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Acorn, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-6chw-6frg-f759 Affected Acorn Versions
3 component(s)References
Frequently Asked Questions
What is GHSA-6chw-6frg-f759?
Which Acorn versions are affected?
What version fixes GHSA-6chw-6frg-f759?
Is acorn affected?
What is the CVSS score of GHSA-6chw-6frg-f759?
What CWE is associated with GHSA-6chw-6frg-f759?
How can I check npm dependencies for GHSA-6chw-6frg-f759?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6chw-6frg-f759",
"modified" : "2021-08-23T15:10:32Z",
"published" : "2020-04-03T21:48:38Z",
"aliases" : [ ],
"summary" : "Regular Expression Denial of Service in Acorn",
"details" : "Affected versions of acorn are vulnerable to Regular Expression Denial of Service.\nA regex in the form of /[x-\\ud800]/u causes the parser to enter an infinite loop.\nThe string is not valid UTF16 which usually results in it being sanitized before reaching the parser.\nIf an application processes untrusted input and passes it directly to acorn,\nattackers may leverage the vulnerability leading to Denial of Service.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "acorn"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.5.0"
}, {
"fixed" : "5.7.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "acorn"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.4.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "acorn"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/acornjs/acorn/issues/929"
}, {
"type" : "WEB",
"url" : "https://github.com/acornjs/acorn/commit/793c0e569ed1158672e3a40aeed1d8518832b802"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-ACORN-559469"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1488"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-04-03T21:42:14Z",
"nvd_published_at" : null
}
}