Vulnerabilities in pkg:npm/nope-validator

PACKAGE
Advisory Identifier: GHSA-3phv-83cj-p8p7
Advisory Summary

CVE-2020-26309 is a MODERATE denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Nope validator libraries in the npm ecosystem. The issue involves nope-validator regular expression denial of service vulnerability. Remediation is available by upgrading affected packages to version 0.12.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/nope-validator

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/nope-validator. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3phv-83cj-p8p7 CVE-2020-26309 MODERATE nope-validator Regular Expression Denial of Service vulnerability

CVE-2020-26309 at a Glance

CVE Identifier CVE-2020-26309
GHSA Identifier GHSA-3phv-83cj-p8p7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Nope validator
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2020-26309

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

nope-validator fixed: 0.12.1
npm install nope-validator@0.12.1
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 nope-validator

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2020-26309, inspect your project dependencies using npm:

npm ls nope-validator

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

Note: The npm ls nope-validator 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Nope validator, 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

Nope is a JavaScript validator. Versions 0.11.3 and prior contain one or more regular expressions that are vulnerable to Regular Expression Denial of Service (ReDoS). This vulnerability is fixed in 0.12.1.

CVE-2020-26309 Affected Nope validator Versions

1 component(s)
Fixed Versions:
0.12.1
Product / Package Ecosystem Affected Versions Fixed Version
nope-validator
npm
< 0.12.1
0.12.1

References

Frequently Asked Questions

What is CVE-2020-26309?
CVE-2020-26309 is a security vulnerability in Nope validator involving nope-validator Regular Expression Denial of Service vulnerability under CWE-1333: Inefficient Regular Expression Complexity.
Which Nope validator versions are affected?
Affected versions include releases prior to 0.12.1 across affected packages: nope-validator.
What version fixes CVE-2020-26309?
Upgrading to 0.12.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nope-validator affected?
Yes, nope-validator is affected in releases prior to 0.12.1. Upgrade your dependency to 0.12.1 or later.
What CWE is associated with CVE-2020-26309?
CVE-2020-26309 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2020-26309?
Run the dependency tree command: 'npm ls nope-validator'. 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-3phv-83cj-p8p7",
  "modified" : "2024-10-28T14:56:39Z",
  "published" : "2024-10-26T21:30:46Z",
  "aliases" : [ "CVE-2020-26309" ],
  "summary" : "nope-validator Regular Expression Denial of Service vulnerability",
  "details" : "Nope is a JavaScript validator. Versions 0.11.3 and prior contain one or more regular expressions that are vulnerable to Regular Expression Denial of Service (ReDoS). This vulnerability is fixed in 0.12.1.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nope-validator"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.12.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26309"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ftonato/nope-validator/issues/352"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ftonato/nope-validator/commit/4564b7444dcd92769e5c5b80420469c9f18b7a05#diff-9c399c46fa266bcf2be2704fbb369181726959e148e95ab548a32ef9ca9e7d47R1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ftonato/nope-validator/commit/c8af9f93abe8f4786f8f69d2b0518f8ca3652f44"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ftonato/nope-validator"
  }, {
    "type" : "ADVISORY",
    "url" : "https://securitylab.github.com/advisories/GHSL-2020-303-redos-nope-validator"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-28T14:56:39Z",
    "nvd_published_at" : "2024-10-26T21:15:14Z"
  }
}