fix(deps): bump adm-zip to 0.6.0 (Dependabot #88/#89)#3462
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Fixes Dependabot alerts #88 and #89 —
adm-zip < 0.6.0allows 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.tsrunsnew 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.0bun.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.jsonbut leftbun.lockout of sync, which would breakbun install --frozen-lockfilein 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=truein 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-zipto 0.6.0 to patch a DoS that can allocate ~4 GB from crafted ZIPs, reachable via user-uploaded xlsx/docx questionnaire files. Updatesapps/api/package.jsonandbun.lock; usage is unchanged; resolves Dependabot #88/#89 and supersedes #3451.Written for commit 927b2e8. Summary will update on new commits.