Skip to content

Replace unmaintained decompress package with tar + fflate - #32

Merged
tschneidereit merged 1 commit into
bytecodealliance:mainfrom
vavsab:fix/decompress-cve-use-tar
Jul 8, 2026
Merged

Replace unmaintained decompress package with tar + fflate#32
tschneidereit merged 1 commit into
bytecodealliance:mainfrom
vavsab:fix/decompress-cve-use-tar

Conversation

@vavsab

@vavsab vavsab commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Follows up on #30 / suggested by @tschneidereit.

Drops decompress / decompress-tar / decompress-unzip (GHSA-mp2f-45pm-3cg9) in favour of tar (isaacs/node-tar) for .tar.xz and fflate for .zip. Call-site semantics are unchanged.

npm audit reports 0 vulnerabilities.

@vavsab
vavsab force-pushed the fix/decompress-cve-use-tar branch from d49a9bb to 77b466a Compare July 8, 2026 08:47
Drop `decompress` / `decompress-tar` / `decompress-unzip` in favour of
`tar` (isaacs/node-tar) for .tar and `fflate` for .zip.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vavsab
vavsab force-pushed the fix/decompress-cve-use-tar branch from 77b466a to e2b16a7 Compare July 8, 2026 08:50
@vavsab

vavsab commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@tschneidereit Please review. I am available to perform adjustments if needed

@tschneidereit tschneidereit changed the title npm: replace decompress with tar + fflate (fixes GHSA-mp2f-45pm-3cg9) Replace unmaintained decompress package with tar + fflate Jul 8, 2026

@tschneidereit tschneidereit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!

@tschneidereit
tschneidereit merged commit debcd07 into bytecodealliance:main Jul 8, 2026
11 checks passed
@vavsab
vavsab deleted the fix/decompress-cve-use-tar branch July 8, 2026 13:21
@vavsab

vavsab commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@tschneidereit Thanks for merging! Anything I can do to help to create a new release here?
https://www.npmjs.com/package/@bytecodealliance/weval
I can create a PR to automate package publishing by using new Github Oauth trusted publishers that eliminate the need of using npm tokens.

@tschneidereit

Copy link
Copy Markdown
Member

That'd make sense to do, yes. Please take a look at bytecodealliance/wizer#143 for how wizer as an extremely similar project is doing this.

einarfd added a commit to einarfd/wiremirage that referenced this pull request Aug 13, 2026
…y risk

Three Dependabot alerts (GHSA zip-slip / arbitrary-file-write / arbitrary-
hardlink-creation in the abandoned `decompress` npm package) come through
componentize-js -> @bytecodealliance/weval -> decompress. No fix exists
to bump to on npm today, so this can't be closed the way the Cargo-side
advisories were.

Traced weval's actual usage: decompress only extracts weval's own
precompiled binary, downloaded from a fixed, version-pinned
github.com/bytecodealliance/weval release tag, inside the throwaway
js-engine-builder Docker stage — never attacker- or SUT-controlled
input, never part of the shipped image or reachable at mock-dispatch
time. Residual risk is a supply-chain trust assumption on that release
asset.

Upstream already merged the fix (bytecodealliance/weval#32, decompress
-> tar+fflate, 2026-07-08) but hasn't published a release past it yet
(npm latest is still 0.4.1). This should resolve itself on the next
componentize-js/weval bump.

Left a comment in build.mjs (same spot/style as the typescript-6 pin
note) so this doesn't need re-investigating from scratch. Alerts #7,
#8, #9 are the GitHub-side counterpart — dismiss manually as
tolerable_risk (the token this session used lacks the security_events
scope to do it via API).
einarfd added a commit to einarfd/wiremirage that referenced this pull request Aug 24, 2026
…y risk

Three Dependabot alerts (GHSA zip-slip / arbitrary-file-write / arbitrary-
hardlink-creation in the abandoned `decompress` npm package) come through
componentize-js -> @bytecodealliance/weval -> decompress. No fix exists
to bump to on npm today, so this can't be closed the way the Cargo-side
advisories were.

Traced weval's actual usage: decompress only extracts weval's own
precompiled binary, downloaded from a fixed, version-pinned
github.com/bytecodealliance/weval release tag, inside the throwaway
js-engine-builder Docker stage — never attacker- or SUT-controlled
input, never part of the shipped image or reachable at mock-dispatch
time. Residual risk is a supply-chain trust assumption on that release
asset.

Upstream already merged the fix (bytecodealliance/weval#32, decompress
-> tar+fflate, 2026-07-08) but hasn't published a release past it yet
(npm latest is still 0.4.1). This should resolve itself on the next
componentize-js/weval bump.

Left a comment in build.mjs (same spot/style as the typescript-6 pin
note) so this doesn't need re-investigating from scratch. Alerts #7,
#8, #9 are the GitHub-side counterpart — dismiss manually as
tolerable_risk (the token this session used lacks the security_events
scope to do it via API).
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