Skip to content

fix(ios): Zip Slip + skip symlinks on full extract (9.4.1) - #376

Open
plrthink wants to merge 1 commit into
masterfrom
cursor/ios-security-v7-backports-0f19
Open

fix(ios): Zip Slip + skip symlinks on full extract (9.4.1)#376
plrthink wants to merge 1 commit into
masterfrom
cursor/ios-security-v7-backports-0f19

Conversation

@plrthink

Copy link
Copy Markdown
Collaborator

Summary

Closes the remaining iOS security gaps called out in SECURITY.md:

  • Full unzip (unzip, unzipWithPassword, unzipAssets) no longer delegates to SSZipArchive unzipFileAtPath. It now uses the same minizip extract path as selective extract.
  • Zip Slip: traversal entries reject with ERR_UNSAFE_PATH via isSafeExtractPath.
  • Symlinks: symlink entries are skipped (not materialized), matching Android React Native Zip Archive Android zip4j symlink target escape #357 behavior via shouldSkipZipEntry.

Changes

  • Unified extractZipArchive replaces separate full-unzip (SSZipArchive) and selective-unzip paths.
  • Removed RNZipCancelDelegate (cancel is handled in the minizip loop).
  • Bumped version to 9.4.1; updated SECURITY.md, CHANGELOG.md, and metadata tests.

Testing

  • npm test — 49/49 passing
Open in Web Open in Cursor 

Replace SSZipArchive full-unzip with the same minizip path used for
selective extract. Rejects traversal entries with ERR_UNSAFE_PATH and
skips symlink/__MACOSX entries instead of materializing them.

Co-authored-by: Perry <plrthink@gmail.com>
@plrthink
plrthink marked this pull request as ready for review August 29, 2026 11:01
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.

2 participants