Vulnerabilities in pkg:npm/fast-csv

PACKAGE
Advisory Identifier: GHSA-8cv5-p934-3hwp
Advisory Summary

CVE-2020-26256 is a LOW (CVSS 5.7) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Fast csv libraries in the npm ecosystem. The issue involves denial of service in fast-csv. Remediation is available by upgrading affected packages to version 4.3.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/fast-csv

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-8cv5-p934-3hwp CVE-2020-26256 LOW Denial of service in fast-csv

CVE-2020-26256 at a Glance

CVE Identifier CVE-2020-26256
GHSA Identifier GHSA-8cv5-p934-3hwp
Severity LOW
CVSS v3.1 Base Score 5.7
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Fast csv
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H).

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

How to Fix CVE-2020-26256

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

fast-csv fixed: 4.3.6
npm install fast-csv@4.3.6
@fast-csv/parse fixed: 4.3.6
npm install @fast-csv/parse@4.3.6
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 fast-csv

How to Check if You Are Affected

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

npm ls fast-csv

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

Note: The npm ls fast-csv 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 Fast csv, 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

### Impact Possible ReDoS (Regular Expression Denial of Service) when using `ignoreEmpty` option when parsing. ### Patches This has been patched in `v4.3.6` ### Workarounds You will only be affected by this if you use the `ignoreEmpty` parsing option. If you do use this option it is recommended that you upgrade to the latest version `v4.3.6` ### References This vulnerability was found using a [CodeQL](https://securitylab.github.com/tools/codeql) query which identified `EMPTY_ROW_REGEXP` regular expression as vulnerable. [Link to query run](https://lgtm.com/query/8609731774537641779/). ### For more information If you have any questions or comments about this advisory: * Open an issue in [fast-csv](https://github.com/C2FO/fast-csv)

CVE-2020-26256 Affected Fast csv Versions

2 component(s)
Fixed Versions:
4.3.6
Product / Package Ecosystem Affected Versions Fixed Version
fast-csv
npm
< 4.3.6
4.3.6
@fast-csv/parse
npm
< 4.3.6
4.3.6

References

Frequently Asked Questions

What is CVE-2020-26256?
CVE-2020-26256 is a security vulnerability in Fast csv involving Denial of service in fast-csv under CWE-400: Uncontrolled Resource Consumption.
Which Fast csv versions are affected?
Affected versions include releases prior to 4.3.6 across affected packages: fast-csv, @fast-csv/parse.
What version fixes CVE-2020-26256?
Upgrading to 4.3.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fast-csv affected?
Yes, fast-csv is affected in releases prior to 4.3.6. Upgrade your dependency to 4.3.6 or later.
Is @fast-csv/parse affected?
Yes, @fast-csv/parse is affected in releases prior to 4.3.6. Upgrade your dependency to 4.3.6 or later.
What is the CVSS score of CVE-2020-26256?
CVE-2020-26256 has a CVSS v3.1 base score of 5.7 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2020-26256?
CVE-2020-26256 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2020-26256?
Run the dependency tree command: 'npm ls fast-csv'. 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-8cv5-p934-3hwp",
  "modified" : "2021-10-08T20:36:36Z",
  "published" : "2020-12-08T21:42:53Z",
  "aliases" : [ "CVE-2020-26256" ],
  "summary" : "Denial of service in fast-csv",
  "details" : "### Impact\nPossible ReDoS (Regular Expression Denial of Service) when using `ignoreEmpty` option when parsing.\n\n### Patches\nThis has been patched in `v4.3.6`\n\n### Workarounds\nYou will only be affected by this if you use the `ignoreEmpty` parsing option. If you do use this option it is recommended that you upgrade to the latest version `v4.3.6`\n\n### References\n\nThis vulnerability was found using a [CodeQL](https://securitylab.github.com/tools/codeql) query which identified `EMPTY_ROW_REGEXP` regular expression as vulnerable.\n[Link to query run](https://lgtm.com/query/8609731774537641779/). \n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [fast-csv](https://github.com/C2FO/fast-csv)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "fast-csv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.3.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fast-csv/parse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.3.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/C2FO/fast-csv/security/advisories/GHSA-8cv5-p934-3hwp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26256"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/C2FO/fast-csv/issues/540"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/C2FO/fast-csv/commit/4bbd39f26a8cd7382151ab4f5fb102234b2f829e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/C2FO/fast-csv"
  }, {
    "type" : "WEB",
    "url" : "https://lgtm.com/query/8609731774537641779"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1587"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1588"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@fast-csv/parse"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/fast-csv"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-12-08T21:42:31Z",
    "nvd_published_at" : "2020-12-08T22:15:00Z"
  }
}