GHSA-jcgq-xh2f-2hfm: Eslint Denial of Service Vulnerability

MODERATE
Published
Advisory Summary

GHSA-jcgq-xh2f-2hfm is a MODERATE denial of service vulnerability (General Security Weakness) affecting Eslint libraries in the npm ecosystem. The issue involves regular expression denial of service. Remediation is available by upgrading affected packages to version 4.18.2.

GHSA-jcgq-xh2f-2hfm at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jcgq-xh2f-2hfm
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Eslint
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-jcgq-xh2f-2hfm

To remediate this vulnerability, upgrade all affected Eslint dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

eslint fixed: 4.18.2
npm install eslint@4.18.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls eslint

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-jcgq-xh2f-2hfm, inspect your project dependencies using npm:

npm ls eslint

Analyze the terminal output to locate any version of Eslint in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.18.2), your application is affected.

Note: The npm ls eslint 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 General Security Weakness. In Eslint, 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

A vulnerability was descovered in eslint before 4.18.2. One of the regexes in eslint is vulnerable to catastrophic backtracking.

GHSA-jcgq-xh2f-2hfm Affected Eslint Versions

1 component(s)
Fixed Versions:
4.18.2
Product / Package Ecosystem Affected Versions Fixed Version
eslint
npm
< 4.18.2
4.18.2

References

Frequently Asked Questions

What is GHSA-jcgq-xh2f-2hfm?
GHSA-jcgq-xh2f-2hfm is a security vulnerability in Eslint involving Regular Expression Denial of Service under General Security Weakness.
Which Eslint versions are affected?
Affected versions include releases prior to 4.18.2 across affected packages: eslint.
What version fixes GHSA-jcgq-xh2f-2hfm?
Upgrading to 4.18.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is eslint affected?
Yes, eslint is affected in releases prior to 4.18.2. Upgrade your dependency to 4.18.2 or later.
What CWE is associated with GHSA-jcgq-xh2f-2hfm?
GHSA-jcgq-xh2f-2hfm is classified under General Security Weakness.
How can I check npm dependencies for GHSA-jcgq-xh2f-2hfm?
Run the dependency tree command: 'npm ls eslint'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jcgq-xh2f-2hfm",
  "modified" : "2021-02-25T01:20:42Z",
  "published" : "2021-02-25T01:20:42Z",
  "withdrawn" : "2021-02-25T01:20:42Z",
  "aliases" : [ ],
  "summary" : "Regular Expression Denial of Service",
  "details" : "A vulnerability was descovered in eslint before 4.18.2. One of the regexes in eslint is vulnerable to catastrophic backtracking.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "eslint"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.18.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/eslint/eslint/issues/10002"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eslint/eslint/commit/f6901d0bcf6c918ac4e5c6c7c4bddeb2cb715c09"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-06-19T22:01:29Z",
    "nvd_published_at" : null
  }
}