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

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 #89 — adm-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

@Marfuen
Marfuen merged commit 300f2a1 into main Jul 21, 2026
10 checks passed
@Marfuen
Marfuen deleted the mariano/fix-adm-zip-dependabot branch July 21, 2026 03:23
claudfuen pushed a commit that referenced this pull request Jul 22, 2026
# [3.106.0](v3.105.0...v3.106.0) (2026-07-22)

### Bug Fixes

* **auth:** attribute API-key mutations to the key's creator, not the org owner ([#3472](#3472)) ([206ed96](206ed96)), closes [hi#risk](https://github.com/hi/issues/risk)
* **deps:** bump adm-zip 0.5.18 -> 0.6.0 in apps/api (Dependabot [#88](https://github.com/trycompai/comp/issues/88)/[#89](https://github.com/trycompai/comp/issues/89)) ([#3462](#3462)) ([300f2a1](300f2a1)), closes [#3451](#3451)
* **deps:** override tar to ^7.5.19 to clear node-tar Dependabot alerts ([#94](https://github.com/trycompai/comp/issues/94)-[#104](https://github.com/trycompai/comp/issues/104)) ([#3466](#3466)) ([8ab5709](8ab5709))
* **deps:** patch engine.io ([#93](#93)) and body-parser ([#92](#92)) Dependabot alerts ([#3464](#3464)) ([94c33b1](94c33b1))
* **isms:** harden internal-audit validation and edge cases from deploy review ([#3473](#3473)) ([c6c7379](c6c7379))
* **policies:** create draft version on policy regenerate instead of overwriting published ([#3471](#3471)) ([ff31dbd](ff31dbd))
* **policies:** delete detached PDF objects when regenerating a draft ([#3474](#3474)) ([ecd1bd0](ecd1bd0))
* **policies:** rename CreateVersionDto to avoid swagger collision with automations ([#3469](#3469)) ([2d5290a](2d5290a))

### Features

* **isms:** internal audit programme, plan and report — clause 9.2 (CS-724) ([#3468](#3468)) ([42e5ebd](42e5ebd)), closes [hi#impact](https://github.com/hi/issues/impact)
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.106.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

This branch was successfully deployed

3 active deployments
Preview – portal — 927b2e8b Deployed Jul 21, 2026 by vercel[bot]
Preview – app — 927b2e8b Deployed Jul 21, 2026 by vercel[bot]
Preview – comp-framework-editor — 927b2e8b Deployed Jul 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants