Skip to content

fix(security): replace vulnerable extract-zip with path-safe extractor - #35

Merged
OmarRao merged 1 commit into
mainfrom
fix/extract-zip-advisory
Aug 26, 2026
Merged

fix(security): replace vulnerable extract-zip with path-safe extractor#35
OmarRao merged 1 commit into
mainfrom
fix/extract-zip-advisory

Conversation

@OmarRao

@OmarRao OmarRao commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Removes extract-zip (GHSA-jmr9-qjv8-65gv — symlink path traversal, no patched version) and replaces it with node-stream-zip behind src/lib/safe-extract.js, which rejects absolute paths, .. traversal, and symlink entries before writing (zip-slip safe).

  • Wired into restore; npm audit now reports 0 vulnerabilities.
  • tests/safe-extract.test.js: path-guard unit tests + a real byte-patched zip-slip archive that is refused with nothing written outside the destination.
  • 105/105 tests pass, ESLint clean, SPDX headers present.
  • Docs: advisory marked resolved in DEPENDENCY-LICENSE-REVIEW.md; CHANGELOG updated.

No co-authors.

@
fix(security): replace vulnerable extract-zip with path-safe extractor

- Remove extract-zip (GHSA-jmr9-qjv8-65gv: unvalidated symlink path traversal,
  no patched version available).
- Add src/lib/safe-extract.js using node-stream-zip; rejects absolute paths,
  ".." traversal, and symlink entries before writing (zip-slip safe).
- Wire into restore (src/restore/index.js).
- tests/safe-extract.test.js: path-guard units + real zip-slip archive refused
  with nothing written outside destination.
- npm audit: 0 vulnerabilities. 105/105 tests pass, lint + headers clean.
- Docs: DEPENDENCY-LICENSE-REVIEW advisory marked resolved; CHANGELOG updated.
@
@OmarRao
OmarRao merged commit 89de857 into main Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant