Vulnerabilities in pkg:npm/esm
PACKAGEGHSA-qx4v-6gc5-f2vv is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Esm libraries in the npm ecosystem. The issue involves regular expression denial of service. Remediation is available by upgrading affected packages to version 3.1.0.
pkg:npm/esm
Vulnerability advisories affecting package pkg:npm/esm. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-qx4v-6gc5-f2vv | - | MODERATE | Regular Expression Denial of Service |
GHSA-qx4v-6gc5-f2vv at a Glance
How to Fix GHSA-qx4v-6gc5-f2vv
To remediate this vulnerability, upgrade all affected Esm 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 esm@3.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls esm
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-qx4v-6gc5-f2vv, inspect your project dependencies using npm:
npm ls esm
Analyze the terminal output to locate any version of Esm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.0), your application is affected.
Note: The npm ls esm 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 Esm, 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-qx4v-6gc5-f2vv Affected Esm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
esm
|
npm |
< 3.1.0
|
3.1.0
|
References
Frequently Asked Questions
What is GHSA-qx4v-6gc5-f2vv?
Which Esm versions are affected?
What version fixes GHSA-qx4v-6gc5-f2vv?
Is esm affected?
What CWE is associated with GHSA-qx4v-6gc5-f2vv?
How can I check npm dependencies for GHSA-qx4v-6gc5-f2vv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qx4v-6gc5-f2vv",
"modified" : "2021-02-25T17:20:28Z",
"published" : "2019-06-20T14:32:56Z",
"aliases" : [ ],
"summary" : "Regular Expression Denial of Service",
"details" : "A Regular Expression Denial of Service vulnerability was discovered in esm before 3.1.0. The issue is that esm's find-indexes is using the unescaped identifiers in a regex, which, in this case, causes an infinite loop.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "esm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/standard-things/esm/issues/694"
}, {
"type" : "WEB",
"url" : "https://github.com/standard-things/esm/commit/c41e001d81a5a52b0d2d1722b1c2af04d997c05b"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-20T14:17:20Z",
"nvd_published_at" : null
}
}