Critical Prototype Pollution Vulnerability in node-jszip Package
Summary
UBUNTU-CVE-2021-23413: This affects the package jszip before 3.7.0. Affects node-jszip versions 3.1.4+dfsg-1. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The node-jszip package is a widely used JavaScript library that allows developers to create, read, and edit .zip files in Node.js applications. It provides a simple API for handling zip file operations, making it a popular choice for applications that require file compression and packaging. However, prior to version 3.7.0, the package was found to be vulnerable to a prototype pollution issue, which could lead to serious security implications.
Vulnerability Detail
This vulnerability, identified as CVE-2021-23413, affects the jszip package before version 3.7.0. It arises when a user crafts a zip file with filenames that correspond to Object prototype values (such as proto or toString). This can result in a returned object that has a modified prototype instance, potentially allowing attackers to manipulate the behavior of the application. The ramifications of this vulnerability can include unauthorized access to sensitive data or the execution of arbitrary code, making it critical for developers to address.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, developers can avoid using filenames that correspond to Object prototype values when creating zip files. This can help mitigate the risk until the package is updated. For example, ensure that filenames do not include 'proto' or 'toString'.
Conclusion
The node-jszip package has a critical vulnerability that can lead to prototype pollution, affecting the security of applications that utilize it. It is crucial for developers to update to the patched version to mitigate risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for node-jszip →
FAQ
CVE-2021-23413 is a vulnerability in the node-jszip package that allows for prototype pollution through crafted zip files.
You can use Vulert, which monitors open-source vulnerabilities in your software using just a manifest file like package-lock.json. Visit Vulert Scanner to check your application without signup.
The vulnerability can lead to unauthorized access to sensitive data or execution of arbitrary code, posing significant security risks.
You can update the package by running 'npm install node-jszip@3.7.1' or a later version in your terminal.
The CVSS score of this vulnerability is 5.3, indicating a moderate level of severity.
Related vulnerabilities
Recent vulnerabilities recorded for node-jszip.