Directory Traversal Vulnerability in JSZip Package

node-jszip Updated 02 Oct 2025

Summary

29/01/2023
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2022-48285: loadAsync in JSZip before 3.8.0 allows Directory Traversal via a crafted ZIP archive. Affects node-jszip versions < 3.10.0+dfsg-1. Fixed in 3.10.0+dfsg-1. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

JSZip is a popular JavaScript library used for creating, reading, and editing .zip files in web applications. It provides a simple API for handling ZIP file operations, making it a valuable tool for developers who need to manage compressed file formats. However, prior to version 3.10.0, JSZip was susceptible to a directory traversal vulnerability that could allow attackers to manipulate file paths within ZIP archives.

Vulnerability Detail

The vulnerability, identified as CVE-2022-48285, exists in the loadAsync function of JSZip versions before 3.8.0. It allows for directory traversal via a crafted ZIP archive, potentially enabling an attacker to extract files to arbitrary locations on the server. This could lead to unauthorized access to sensitive files or system compromise, making it a significant security risk for applications utilizing this library.

How To Fix

Minimum fixed version

3.10.0+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-jszip

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not feasible, consider implementing input validation to sanitize ZIP file contents before processing them. This can help mitigate the risk of directory traversal attacks.

Conclusion

The directory traversal vulnerability in the JSZip package poses a significant risk to applications that utilize it. By updating to the patched version and implementing best practices for input validation, developers can protect their applications from potential attacks.

See every vulnerability recorded for node-jszip →

Share this vulnerability

FAQ

A directory traversal vulnerability allows an attacker to access files and directories that are stored outside the intended directory structure, potentially leading to unauthorized data access.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Failure to address this vulnerability could result in unauthorized access to sensitive files, data breaches, or even complete system compromise.

Yes, Vulert provides a service that monitors and alerts for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

If you cannot update the package right away, implement input validation to sanitize ZIP file contents to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for node-jszip.

How To Fix

Minimum fixed version

3.10.0+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-jszip

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback