csv-parse is vulnerable to Prototype Pollution
58
Medium Risk
csv-parse builds record objects from CSV header names when the columns option is enabled. With group_columns_by_name also enabled, a duplicated header such as __proto__ reaches the duplicate-column branch, which assigns an array to obj['__proto__'] and invokes the prototype setter, replacing the parsed record's prototype with input-controlled data. Before the fix this let untrusted CSV header rows replace or pollute the record prototype. The fix uses Object.hasOwn for the duplicate check and Object.defineProperty for assignment so a __proto__ column becomes an ordinary own property.
You are affected if you are using a version that falls within the vulnerable range and you parse untrusted CSV input with both the columns and group_columns_by_name options enabled.
csv-parse is vulnerable to Prototype Pollution in versions 0.0.1 - 7.0.1.
Upgrade the csv-parse library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant