Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@zip.js/zip.js

Latest version: v2.25.1

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: gildas-lormeau, zip.js
3,915 Stars
545 Forks
46 Versions
37.3M Downloads
JavaScript Repo language

Scan summary

@zip.js/zip.js was last scanned on 29 Nov 2026 at version 2.25.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 46 versions; the latest was published on 29 Nov 2026.
  • Findings: 1 rule fired in version 2.25.1 (2 instances: 2 low). The score describes this version only.
  • Downloads: 37,258,335 downloads.

Versions

46 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.25.1 LATEST 29 Nov 2026 1 rule fired
2.24.0 16 Oct 2026 1 rule fired
2.22.1 2 Oct 2026 1 rule fired
2.22.0 30 Sep 2026 Not shown
2.21.0 30 Sep 2026 Not shown

Rules fired in 2.25.1: 1

Findings

2 Low

Findings for v2.25.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

WebAssembly module included

The package includes a WebAssembly (.wasm) module. It cannot be reviewed as source, but it runs sandboxed inside the JavaScript runtime and can access only what the host code gives it. WebAssembly is common in parsers, codecs and cryptography libraries. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 2 findings with descriptions and instance counts

The score describes 2.25.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Introduction

zip.js is a JavaScript open-source library (BSD-3-Clause license) for compressing and decompressing zip files. It has been designed to handle large amounts of data. It supports notably multi-core compression, native compression with compression streams, pluggable compression engines, archives larger than 4GB with Zip64, split zip files, data encryption, incremental writing, and Deflate64 decompression.

Demo

See https://gildas-lormeau.github.io/zip-manager

Documentation

See here for more info: https://gildas-lormeau.github.io/zip.js/

Examples

Hello world

import {
  BlobReader,
  BlobWriter,
  TextReader,
  TextWriter,
  ZipReader,
  ZipWriter
} from "@zip.js/zip.js";
// "jsr:@zip-js/zip-js" for Deno

// ----
// Write the zip file
// ----

// Creates a BlobWriter object where the zip content will be written.
const zipFileWriter = new BlobWriter();
// Creates a TextReader object storing the text of the entry to add in the zip
// (i.e. "Hello world!").
const helloWorldReader = new TextReader("Hello world!");

// Creates a ZipWriter object writing data via `zipFileWriter`, adds the entry
// "hello.txt" containing the text "Hello world!" via `helloWorldReader`, and
// closes the writer.
const zipWriter = new ZipWriter(zipFileWriter);
await zipWriter.add("hello.txt", helloWorldReader);
await zipWriter.close();

// Retrieves the Blob object containing the zip content into `zipFileBlob`. It
// is also returned by zipWriter.close() for more convenience.
const zipFileBlob = await zipFileWriter.getData();

// ----
// Read the zip file
// ----

// Creates a BlobReader object used to read `zipFileBlob`.
const zipFileReader = new BlobReader(zipFileBlob);
// Creates a TextWriter object where the content of the first entry in the zip
// will be written.
const helloWorldWriter = new TextWriter();

// Creates a ZipReader object reading the zip content via `zipFileReader`,
// retrieves metadata (name, dates, etc.) of the first entry, retrieves its
// content via `helloWorldWriter`, and closes the reader.
const zipReader = new ZipReader(zipFileReader);
const firstEntry = (await zipReader.getEntries()).shift();
const helloWorldText = await firstEntry.getData(helloWorldWriter);
await zipReader.close();

// Displays "Hello world!".
console.log(helloWorldText);

Run the code on JSFiddle: https://jsfiddle.net/tm9fhvab/

Hello world with the filesystem API

The filesystem API stores the entries in a tree instead of a flat list. It needs a single import, it infers the Reader and the Writer from the type of the data, and it reaches an entry from its name instead of searching it in an array.

import { ZipFS } from "@zip.js/zip.js";
// "jsr:@zip-js/zip-js" for Deno

// ----
// Write the zip file
// ----

// Creates a ZipFS object and adds two entries to it. The name of an entry is a
// path, so the "folder" directory is created by the second call.
const zipFs = new ZipFS();
zipFs.addText("hello.txt", "Hello world!");
zipFs.addText("folder/hello.txt", "Hello world from a directory!");

// Retrieves the Blob object containing the zip content.
const zipFileBlob = await zipFs.exportBlob();

// ----
// Read the zip file
// ----

// Imports the zip content into a new ZipFS object, then retrieves the content
// of the entries from their full name.
const importedZipFs = new ZipFS();
await importedZipFs.importBlob(zipFileBlob);
const helloWorldText = await importedZipFs.find("hello.txt").getText();
const nestedText = await importedZipFs.find("folder/hello.txt").getText();

// Displays "Hello world!" and "Hello world from a directory!".
console.log(helloWorldText, nestedText);

Run the code on JSFiddle: https://jsfiddle.net/gcnret0x/

Hello world with Streams

import {
  BlobReader,
  ZipReader,
  ZipWriter
} from "@zip-js/zip-js";
// Prefix "@zip-js/zip-js" with "jsr:" for Deno

// ----
// Write the zip file
// ----

// Creates a TransformStream object, the zip content will be written in the
// `writable` property.
const zipFileStream = new TransformStream();
// Creates a Promise object resolved to the zip content returned as a Blob
// object retrieved from `zipFileStream.readable`.
const zipFileBlobPromise = new Response(zipFileStream.readable).blob();
// Creates a ReadableStream object storing the text of the entry to add in the
// zip (i.e. "Hello world!").
const helloWorldReadable = new Blob(["Hello world!"]).stream();

// Creates a ZipWriter object writing data into `zipFileStream.writable`, adds
// the entry "hello.txt" containing the text "Hello world!" retrieved from
// `helloWorldReadable`, and closes the writer.
const zipWriter = new ZipWriter(zipFileStream.writable);
await zipWriter.add("hello.txt", helloWorldReadable);
await zipWriter.close();

// Retrieves the Blob object containing the zip content into `zipFileBlob`.
const zipFileBlob = await zipFileBlobPromise;

// ----
// Read the zip file
// ----

// Creates a BlobReader object used to read `zipFileBlob`.
const zipFileReader = new BlobReader(zipFileBlob);
// Creates a TransformStream object, the content of the first entry in the zip
// will be written in the `writable` property.
const helloWorldStream = new TransformStream();
// Creates a Promise object resolved to the content of the first entry returned
// as text from `helloWorldStream.readable`.
const helloWorldTextPromise = new Response(helloWorldStream.readable).text();

// Creates a ZipReader object reading the zip content via `zipFileReader`,
// retrieves metadata (name, dates, etc.) of the first entry, retrieves its
// content into `helloWorldStream.writable`, and closes the reader.
const zipReader = new ZipReader(zipFileReader);
const firstEntry = (await zipReader.getEntries()).shift();
await firstEntry.getData(helloWorldStream.writable);
await zipReader.close();

// Displays "Hello world!".
const helloWorldText = await helloWorldTextPromise;
console.log(helloWorldText);

Run the code on JSFiddle: https://jsfiddle.net/aw3d6f4o/

Adding concurrently multiple entries in a zip file

import {
  BlobWriter,
  HttpReader,
  TextReader,
  ZipWriter,
} from "@zip-js/zip-js";
// Prefix "@zip-js/zip-js" with "jsr:" for Deno

const README_URL = "https://unpkg.com/@zip.js/zip.js/README.md";
getZipFileBlob()
  .then(downloadFile);

async function getZipFileBlob() {
  const zipWriter = new ZipWriter(new BlobWriter("application/zip"));
  await Promise.all([
    zipWriter.add("hello.txt", new TextReader("Hello world!")),
    zipWriter.add("README.md", new HttpReader(README_URL)),
  ]);
  return zipWriter.close();
}

function downloadFile(blob) {
  document.body.appendChild(Object.assign(document.createElement("a"), {
    download: "hello.zip",
    href: URL.createObjectURL(blob),
    textContent: "Download zip file",
  }));
}

Run the code on Plunker: https://plnkr.co/edit/4sVljNIpqSUE9HCA?preview

Custom web workers and compression engines

zip.js lets you create its web workers yourself by using the new Worker(new URL("./zip-worker.js", import.meta.url)) form. Bundlers like Vite, webpack and Rollup detect it and bundle the worker automatically. You can also delegate compression and decompression to a custom engine, e.g. fflate:

import { configure } from "@zip.js/zip.js/lib/zip-core-custom.js";

configure({
  createWorker: () => new Worker(
    new URL("./zip-worker.js", import.meta.url),
    { type: "module" }
  )
});
// zip-worker.js
import { initWorker } from "@zip.js/zip.js/worker";
import { CompressionStreamFallback, DecompressionStreamFallback } from "./fflate-streams.js";

initWorker({ CompressionStreamFallback, DecompressionStreamFallback });

See https://gildas-lormeau.github.io/zip.js/#custom-workers for a complete guide.

Tests

See https://github.com/gildas-lormeau/zip.js/tree/master/tests/all

Reading untrusted zip files

The sizes declared in a zip file are not verified before the entry is read. A crafted entry can declare a large uncompressedSize, and valid deflate data can expand up to 1032 times its compressed size. Before extracting an entry from an untrusted source, check entry.uncompressedSize against the limit your application accepts, and avoid extracting all the entries concurrently. Uint8ArrayWriter allocates its buffer from the declared size, up to 1032 times entry.compressedSize, so this check matters most when the content is read into memory. Writers which deliver the content progressively, e.g. BlobWriter or a WritableStream, grow with the data actually produced.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @zip.js/zip.js

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Frame 2085668439 (1)
Group 1261154229