CVE-2020-24025: Node sass Improper Certificate Validation Vulnerability

MODERATE
Advisory Identifier: GHSA-r8f7-9pfq-mjmv
CVSS 5.3
CWE-295
Published
Advisory Summary

CVE-2020-24025 is a MODERATE (CVSS 5.3) improper certificate validation vulnerability (CWE-295: Improper Certificate Validation) affecting Node sass libraries in the npm ecosystem. The issue involves improper certificate validation in node-sass. Remediation is available by upgrading affected packages to version 7.0.0.

CVE-2020-24025 at a Glance

CVE Identifier CVE-2020-24025
GHSA Identifier GHSA-r8f7-9pfq-mjmv
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Node sass
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

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:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2020-24025

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

node-sass fixed: 7.0.0
npm install node-sass@7.0.0
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 node-sass

How to Check if You Are Affected

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

npm ls node-sass

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

Note: The npm ls node-sass 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-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Node sass, 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

Certificate validation in node-sass 2.0.0 to 6.0.1 is disabled when requesting binaries even if the user is not specifying an alternative download path.

CVE-2020-24025 Affected Node sass Versions

1 component(s)
Fixed Versions:
7.0.0
Product / Package Ecosystem Affected Versions Fixed Version
node-sass
npm
≥ 2.0.0
< 7.0.0
7.0.0

References

Frequently Asked Questions

What is CVE-2020-24025?
CVE-2020-24025 is a security vulnerability in Node sass involving Improper Certificate Validation in node-sass under CWE-295: Improper Certificate Validation.
Which Node sass versions are affected?
Affected versions include releases prior to 7.0.0 across affected packages: node-sass.
What version fixes CVE-2020-24025?
Upgrading to 7.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is node-sass affected?
Yes, node-sass is affected in releases prior to 7.0.0. Upgrade your dependency to 7.0.0 or later.
What is the CVSS score of CVE-2020-24025?
CVE-2020-24025 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2020-24025?
CVE-2020-24025 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check npm dependencies for CVE-2020-24025?
Run the dependency tree command: 'npm ls node-sass'. 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-r8f7-9pfq-mjmv",
  "modified" : "2023-04-21T19:18:26Z",
  "published" : "2022-02-09T22:22:24Z",
  "aliases" : [ "CVE-2020-24025" ],
  "summary" : "Improper Certificate Validation in node-sass",
  "details" : "Certificate validation in node-sass 2.0.0 to 6.0.1 is disabled when requesting binaries even if the user is not specifying an alternative download path.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "node-sass"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "7.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-24025"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sass/node-sass/issues/3067"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sass/node-sass/pull/3149"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sass/node-sass/pull/567#issuecomment-656609236"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sass/node-sass/commit/0a21792803639851b480fbd8cbcb5540ef974387"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sass/node-sass"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sass/node-sass/releases/tag/v7.0.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-06T22:18:40Z",
    "nvd_published_at" : "2021-01-11T19:15:00Z"
  }
}