Skip to content

fix(security): bump adm-zip to ^0.6.0 to resolve GHSA-xcpc-8h2w-3j85#16375

Open
sebastienlevert wants to merge 1 commit into
OfficeDev:devfrom
sebastienlevert:fix/adm-zip-ghsa-xcpc-8h2w-3j85
Open

fix(security): bump adm-zip to ^0.6.0 to resolve GHSA-xcpc-8h2w-3j85#16375
sebastienlevert wants to merge 1 commit into
OfficeDev:devfrom
sebastienlevert:fix/adm-zip-ghsa-xcpc-8h2w-3j85

Conversation

@sebastienlevert

Copy link
Copy Markdown
Contributor

Summary

Bumps every direct adm-zip declaration to ^0.6.0 to resolve GHSA-xcpc-8h2w-3j85 (high severity, denial of service).

adm-zip before 0.6.0 allocates memory based on the uncompressed size declared in a ZIP central-directory header without bounds-checking it against the actual compressed data, and the allocation happens before CRC validation. A crafted ~120-byte ZIP declaring ~4GB uncompressed size causes an allocation-amplification of >33,000,000:1, crashing the process. All extraction/read paths are affected (readFile, readAsText, extractEntryTo, extractAllTo, extractAllToAsync, test, entry.getData). The vulnerability was surfaced by pnpm audit in a downstream consumer, where adm-zip is pulled in transitively via @microsoft/teamsfx-core.

Changes

File Before After
packages/fx-core/package.json ^0.5.10 ^0.6.0
packages/sdk/package.json ^0.5.9 ^0.6.0
templates/package.json ^0.5.10 ^0.6.0
packages/tests/package.json 0.5.10 0.6.0

@types/adm-zip is intentionally left unchanged — only the runtime dependency is affected by the advisory.

Notes

  • 0.6.0 is the only published release in the advisory's patched range (>=0.6.0); it is the current latest on npm.
  • This PR fixes ATK's direct adm-zip declarations. The advisory can also reach ATK transitively through @microsoft/kiota and office-addin-manifest; those live in separate upstream packages and are out of scope for this repo.
  • I was unable to run the full monorepo build/test locally — relying on CI to validate. Please re-run pipelines as needed.

Security advisory

  • GHSA-xcpc-8h2w-3j85 — adm-zip DoS via crafted ZIP (Buffer.alloc amplification). Fixed in adm-zip@0.6.0.

adm-zip < 0.6.0 is vulnerable to denial of service (GHSA-xcpc-8h2w-3j85):
a crafted ZIP that declares a ~4GB uncompressed size in its central
directory header triggers an unbounded Buffer.alloc before CRC validation,
crashing the process. Bump every direct adm-zip declaration to the patched
0.6.0 release. @types/adm-zip is intentionally left unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 04c8c99b-b190-431f-ad6a-1ae9a014a852
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