Skip to content

fix(deps): bump adm-zip to 0.6.0 (Dependabot #88/#89)#3462

Merged
Marfuen merged 1 commit into
mainfrom
mariano/fix-adm-zip-dependabot
Jul 21, 2026
Merged

fix(deps): bump adm-zip to 0.6.0 (Dependabot #88/#89)#3462
Marfuen merged 1 commit into
mainfrom
mariano/fix-adm-zip-dependabot

Conversation

@Marfuen

@Marfuen Marfuen commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What & why

Fixes Dependabot alerts #88 and #89adm-zip < 0.6.0 allows a crafted ZIP to trigger a ~4 GB memory allocation (DoS, High).

This is genuinely reachable (not a false positive): apps/api/src/questionnaire/utils/content-extractor.ts runs new AdmZip(fileBuffer) directly on user-uploaded questionnaire files (xlsx/docx are ZIP containers). So a crafted upload could OOM the API.

Change

  • apps/api/package.json: adm-zip ^0.5.16 → ^0.6.0
  • bun.lock: updated → resolves adm-zip@0.6.0 (patched)

Our usage (new AdmZip, getEntry, getData, addFile, toBuffer) is unchanged in 0.6.0 (engines: node >=14). API typecheck is clean for the adm-zip consumers (content-extractor.ts, questionnaire.service.ts).

Supersedes Dependabot PR #3451

#3451 bumped apps/api/package.json but left bun.lock out of sync, which would break bun install --frozen-lockfile in CI. This PR updates both. #3451 can be closed.

Related (not in this PR)

The other 4 Dependabot alerts (brace-expansion #90/#91, tmp #58/#59) were dev-only transitive deps of the Speakeasy-generated @trycompai/mcp-server (dev=true in its lockfile, not shipped to consumers, not in the runtime server). Dismissed as "not used in path" with documented rationale.


Summary by cubic

Upgrade adm-zip to 0.6.0 to patch a DoS that can allocate ~4 GB from crafted ZIPs, reachable via user-uploaded xlsx/docx questionnaire files. Updates apps/api/package.json and bun.lock; usage is unchanged; resolves Dependabot #88/#89 and supersedes #3451.

Written for commit 927b2e8. Summary will update on new commits.

Review in cubic

adm-zip < 0.6.0 allows a crafted ZIP to trigger a 4GB memory allocation
(DoS). This is reachable: apps/api/src/questionnaire/utils/content-extractor.ts
runs `new AdmZip(fileBuffer)` on user-uploaded questionnaire files (xlsx/docx
are ZIP containers).

Bumps the direct dependency to ^0.6.0 (patched) and updates bun.lock. Our usage
(new AdmZip, getEntry, getData, addFile, toBuffer) is unchanged in 0.6.0.
Supersedes Dependabot PR #3451, which bumped package.json but left bun.lock
out of sync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 21, 2026 3:22am
comp-framework-editor Ready Ready Preview, Comment Jul 21, 2026 3:22am
portal Ready Ready Preview, Comment Jul 21, 2026 3:22am

Request Review

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