Overview
The csvtojson package, a widely used tool for converting CSV data into JSON format, suffers from a potentially serious vulnerability classified as CVE-2025-57350. The issue stems from insufficient sanitization of nested header names during the parsing process. The vulnerability affects all versions of the package prior to 2.0.10. This flaw is of significant concern given the widespread use of the csvtojson package, and the potential for this vulnerability to be exploited could lead to serious consequences.
The vulnerability, if left unaddressed, could lead to denial of service conditions or unexpected behaviour in applications that utilise the csvtojson package, particularly when processing untrusted CSV data. The severity of this issue is underscored by its potential to compromise systems or lead to data leakage.
Vulnerability Summary
CVE ID: CVE-2025-57350
Severity: High (8.6 on CVSS Score)
Attack Vector: Remote
Privileges Required: Low
User Interaction: None
Impact: Denial of Service, Unexpected Behaviour, Potential System Compromise or Data Leakage
Affected Products
Escape the Surveillance Era
Most apps won’t tell you the truth.
They’re part of the problem.
Phone numbers. Emails. Profiles. Logs.
It’s all fuel for surveillance.
Ameeba Chat gives you a way out.
- • No phone number
- • No email
- • No personal info
- • Anonymous aliases
- • End-to-end encrypted
Chat without a trace.
Product | Affected Versions
csvtojson | Prior to 2.0.10
How the Exploit Works
The vulnerability arises when the csvtojson package processes a CSV file with specially crafted header fields that reference prototype chains (for instance, using __proto__ syntax). The package fails to adequately sanitize these header names during the parsing process, which in turn allows an attacker to modify properties of the base Object prototype. This modification could lead to denial of service conditions or unexpected behaviour in applications relying on unmodified prototype chains.
Conceptual Example Code
An example of a maliciously crafted CSV file might look something like this:
"__proto__,normal_field1
"polluted_value","value1"
In this example, “__proto__” is a nested header name that references prototype chains. When this CSV file is processed by a vulnerable version of the csvtojson package, it allows an attacker to modify properties of the base Object prototype, with potential harmful consequences.
Mitigation Guidance
Users of the csvtojson package are urged to upgrade to version 2.0.10 or later, where the vulnerability has been addressed. If updating is not immediately possible, using a Web Application Firewall (WAF) or Intrusion Detection System (IDS) could serve as temporary mitigation measures. However, these are not long-term solutions and do not address the underlying issue. Developers should always ensure they are using the most recent and secure versions of the packages they depend on.