Skip to content

fix(sandbox): refuse symlink/hardlink members in result tarball extra…#46

Open
aydinnyunus wants to merge 2 commits into
vercel-labs:mainfrom
aydinnyunus:main
Open

fix(sandbox): refuse symlink/hardlink members in result tarball extra…#46
aydinnyunus wants to merge 2 commits into
vercel-labs:mainfrom
aydinnyunus:main

Conversation

@aydinnyunus
Copy link
Copy Markdown

@aydinnyunus aydinnyunus commented May 5, 2026

extractTarballLocally previously shelled out to tar -xzvf with no hardening, so a tarball produced inside the (untrusted) sandbox VM could plant a symlink member followed by a regular file member writing through it. That turned sandbox-side code execution into orchestrator- host arbitrary file write (CVE-2007-4131 / CVE-2018-20482 class) — a clean escape across the trust boundary the README threat model defines.

Switch to node-tar via runtime resolution against node_modules/.pnpm (no package.json change). node-tar strips absolute paths and .. components, refuses to follow symlinks during extraction, and the explicit filter here additionally rejects SymbolicLink and Link members entirely — the agent only ever produces regular FileRecord JSON, so anything else is by definition adversarial.

What changed

I changed the extractTarballLocally to secure version.

Why

There was a security vulnerability.

Verification

  • pnpm test passes
  • pnpm lint passes
  • pnpm knip passes
  • If this adds a matcher: ran it against at least one real repo and confirmed the candidate count is sane

…ction

extractTarballLocally previously shelled out to `tar -xzvf` with no
hardening, so a tarball produced inside the (untrusted) sandbox VM
could plant a symlink member followed by a regular file member writing
through it. That turned sandbox-side code execution into orchestrator-
host arbitrary file write (CVE-2007-4131 / CVE-2018-20482 class) — a
clean escape across the trust boundary the README threat model
defines.

Switch to node-tar via runtime resolution against node_modules/.pnpm
(no package.json change). node-tar strips absolute paths and `..`
components, refuses to follow symlinks during extraction, and the
explicit filter here additionally rejects SymbolicLink and Link
members entirely — the agent only ever produces regular FileRecord
JSON, so anything else is by definition adversarial.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread packages/deepsec/src/sandbox/download.ts
@cramforce
Copy link
Copy Markdown
Contributor

Also, please repush with a signed commit

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​tar@​7.5.13991009990100

View full report

@aydinnyunus aydinnyunus requested a review from cramforce May 5, 2026 18:11
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