# CVE-2020-26256: Denial of service in fast-csv

> Attackers can cause denial of service in fast-csv by exploiting a ReDoS vulnerability when the ignoreEmpty option is enabled.

- **Severity:** Medium 5.7 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 Dec 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-8cv5-p934-3hwp

## What is CVE-2020-26256?

CVE-2020-26256 is a medium-severity denial of service vulnerability in C2FO fast-csv, published on 8 Dec 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Fast-csv is an npm package for parsing and formatting CSVs or any other delimited value file in node. In fast-cvs before version 4.3.6 there is a possible ReDoS vulnerability (Regular Expression Denial of Service) when using ignoreEmpty option when parsing. This has been patched in `v4.3.6` 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` This vulnerability was found using a CodeQL query which identified `EMPTY_ROW_REGEXP` regular expression as vulnerable.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2020-26256?

4 open source packages ship an affected version, including @fast-csv/parse and fast-csv. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@fast-csv/parse` | npm | All versions | 4.3.6 |
| `@fast-csv/parse` | npm | All versions | 4.3.6 |
| `fast-csv` | npm | All versions | 4.3.6 |
| `fast-csv` | npm | All versions | 4.3.6 |

Products: C2fo Fast-Csv.

## How do I fix CVE-2020-26256?

Upgrade @fast-csv/parse to 4.3.6 or later.

## Is CVE-2020-26256 being exploited?

There is no known exploitation of CVE-2020-26256 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-26256 and fix it if it is affected.

What it is: CVE-2020-26256 is a medium-severity denial of service vulnerability in C2FO fast-csv, published on 8 Dec 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-26256 in the wild and no public exploit code.

Affected packages and fixed versions:
- @fast-csv/parse (npm): affected all versions; fixed in 4.3.6
- @fast-csv/parse (npm): affected all versions; fixed in 4.3.6
- fast-csv (npm): affected all versions; fixed in 4.3.6
- fast-csv (npm): affected all versions; fixed in 4.3.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-26256/ (Markdown: https://insights.sbomify.com/CVE-2020-26256/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-26256
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-26256
- OSV: https://osv.dev/vulnerability/CVE-2020-26256

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-26256/
Summaries are generated and may contain mistakes; the official description above is the record.
