CSV Injection Affecting json-2-csv package, versions >=3.15.0 <5.5.11


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.17% (7th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-JSON2CSV-14221326
  • published27 May 2026
  • disclosed6 Dec 2025
  • creditIlsaf Nabiullin

Introduced: 6 Dec 2025

CVE-2026-9673  (opens in a new tab)
CWE-1236  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade json-2-csv to version 5.5.11 or higher.

Overview

json-2-csv is an A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading.

Affected versions of this package are vulnerable to CSV Injection via the preventCsvInjection option which can be bypassed. An attacker can inject formulas into CSV files, which execute when the files are opened in spreadsheet applications.

PoC

const { json2csv } = require('json-2-csv');

const data = [
    { name: 'Alice', value: '100' },
    { name: 'Bob', value: '200' },
    { name: 'Total', value: '   =SUM(B1:B2)' }  // 3 spaces before =
];

const csv = json2csv(data, { preventCsvInjection: true });
console.log(csv);

CVSS Base Scores

version 4.0
version 3.1