CSV Injection Affecting org.webjars.npm:json-2-csv package, versions [0,]


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.03% (11th 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-JAVA-ORGWEBJARSNPM-17115116
  • published1 Jun 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)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

org.webjars.npm: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