Csvtojson is a Node.js package designed for converting CSV data into JSON format with customizable parsing options. Examining versions 0.5.5 and 0.5.4 reveals subtle yet significant differences. The key distinction lies in the dependencies section. Version 0.5.5 simplifies its dependency structure, relying solely on async version ^1.2.1. In contrast, version 0.5.4 includes both async (^1.2.1) and csv-string (^2.3.0). This change suggests a possible refinement in how CSV parsing is handled internally within the library. Developers upgrading to 0.5.5 should be aware that the underlying mechanism for handling CSV strings might have been altered, potentially impacting how specific CSV formats are processed. Both versions share identical development dependencies, including tools for linting, minification, browserification, and testing, indicating a consistent development and testing environment. The core functionality and licensing remain the same, with both versions offering an MIT license and maintained by Keyang Xiang. The release dates show a relatively short gap between the two versions, suggesting the 0.5.5 may be a patch or minor update addressing issues or streamlining the previous version. Therefore, users should assess the change in dependencies against their specific CSV data structures to ensure compatibility and optimal performance when upgrading to version 0.5.5.
All the vulnerabilities related to the version 0.5.5 of the package
CSVTOJSON has a prototype pollution vulnerability
The csvtojson package, a tool for converting CSV data to JSON with customizable parsing capabilities, contains a prototype pollution vulnerability in versions prior to 2.0.10. This issue arises due to insufficient sanitization of nested header names during the parsing process in the parser_jsonarray component. When processing CSV input containing specially crafted header fields that reference prototype chains (e.g., using proto syntax), the application may unintentionally modify properties of the base Object prototype. This vulnerability can lead to denial of service conditions or unexpected behavior in applications relying on unmodified prototype chains, particularly when untrusted CSV data is processed. The flaw does not require user interaction beyond providing a maliciously constructed CSV file.