Description
Versions of the package json-2-csv from 3.15.0 and before 5.5.11 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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | json-2-csv | 3.15.0 – < 5.5.11 | 5.5.11 |
| — | org.webjars.npm:json-2-csv | — | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | opensearch-dashboards-3-dashboards-reporting | 3.7.0-r4 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | json-2-csv | >= 3.15.0, < 5.5.11 | 5.5.11 | GHSA-g27c-q7cp-mhx6 |
References
- https://security.snyk.io/vuln/SNYK-JS-JSON2CSV-14221326
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-17115116
- https://github.com/mrodrig/json-2-csv/blob/main/src/json2csv.ts%23L410
- https://gist.github.com/whoamins/299745a2d36b482b44e9613b78e40613
- https://github.com/mrodrig/json-2-csv/commit/0fdd0bb6d0273178cd940afc323ccbce19688229