Skip to content

fix: upgrade adm-zip to 0.6.0 (CVE-2026-39244) - #359

Open
anupamme wants to merge 1 commit into
cortexkit:masterfrom
anupamme:fix-repo-magic-context-cve-2026-39244-adm-zip
Open

fix: upgrade adm-zip to 0.6.0 (CVE-2026-39244)#359
anupamme wants to merge 1 commit into
cortexkit:masterfrom
anupamme:fix-repo-magic-context-cve-2026-39244-adm-zip

Conversation

@anupamme

@anupamme anupamme commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Upgrade adm-zip from 0.5.17 to 0.6.0 to fix CVE-2026-39244.

Vulnerability

Field Value
ID CVE-2026-39244
Severity HIGH
Scanner trivy
Rule CVE-2026-39244
File bun.lock (dependency: adm-zip)
Assessment Present in dependency tree, not confirmed reachable

Description: adm-zip: adm-zip: Denial of Service via crafted ZIP file leading to excessive memory allocation

Evidence

Scanner confirmation: trivy rule CVE-2026-39244 flagged this pattern.

Threat Model Context

This is a private Node.js application (not published to npm). Vulnerabilities affect this application's own runtime only.

Changes

  • bun.lock
  • package.json

Behavior Preservation

The change is scoped to 2 files on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This change addresses a pattern flagged by static analysis. The code path handles user-influenced input and the fix reduces the attack surface against both manual and automated exploitation.


Automated security fix by OrbisAI Security


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Upgrades adm-zip from 0.5.17 to 0.6.0 to mitigate CVE-2026-39244 (DoS via crafted ZIP). Old behavior risked excessive memory allocation on crafted ZIPs; new version patches the issue without affecting valid archives.

  • Review notes: changes are limited to package.json and bun.lock (root dependency added; lockfile regenerated). The lock still includes onnxruntime-node pulling adm-zip@0.5.17; if that path is reachable, add an overrides entry to force adm-zip@0.6.0 or update onnxruntime-node. After merge, run a fresh install (bun install) and re-run the security scan.

Written for commit 87d7403. Summary will update on new commits.

Review in cubic

Greptile Summary

The PR attempts to remediate CVE-2026-39244 by adding adm-zip 0.6.0 at the workspace root and regenerating bun.lock.

  • Adds adm-zip 0.6.0 as a direct root dependency.
  • Updates the primary adm-zip lockfile resolution to 0.6.0.
  • Retains adm-zip 0.5.17 under onnxruntime-node, leaving the stated dependency-tree remediation incomplete.

Confidence Score: 3/5

This PR should not merge as the CVE remediation because the vulnerable adm-zip 0.5.17 package remains in the installed dependency tree.

Adding adm-zip 0.6.0 at the root cannot satisfy onnxruntime-node's ^0.5.16 range, and the regenerated lockfile explicitly retains the vulnerable nested version.

Files Needing Attention: bun.lock and package.json

Security Review

The vulnerable adm-zip 0.5.17 resolution remains in bun.lock under onnxruntime-node because its ^0.5.16 range cannot accept 0.6.0. The PR therefore does not remove the scanner-visible vulnerable version, although runtime exploitability through repository inputs was not established.

Important Files Changed

Filename Overview
bun.lock Adds adm-zip 0.6.0 but preserves a nested onnxruntime-node/adm-zip 0.5.17 resolution, so the targeted CVE remains in the dependency tree.
package.json Adds an otherwise unused root adm-zip 0.6.0 dependency that does not override onnxruntime-node's incompatible ^0.5.16 requirement.

Reviews (1): Last reviewed commit: "fix: CVE-2026-39244 security vulnerabili..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Automated dependency upgrade by OrbisAI Security
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​adm-zip@​0.6.01001009885100

View full report

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="package.json">

<violation number="1" location="package.json:25">
P0: This change does not remediate CVE-2026-39244. The vulnerable adm-zip@0.5.17 is a transitive dependency of onnxruntime-node (declared as `adm-zip: ^0.5.16`) and remains installed at bun.lock `onnxruntime-node/adm-zip: adm-zip@0.5.17`; adding a top-level `adm-zip: 0.6.0` dependency runs a second, separate copy and does not override the transitive one. Since the app also never imports adm-zip directly, the new direct dependency is unused. Use a bun override (e.g. `"overrides": { "adm-zip": "0.6.0" }`) or update onnxruntime-node so the patched version actually replaces the vulnerable one, then re-scan with trivy.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread package.json
"dists:load-probe": "bun -e \"await import('./packages/plugin/dist/index.js'); await import('./packages/pi-plugin/dist/index.js'); console.log('dists LOAD OK')\""
},
"dependencies": {
"adm-zip": "0.6.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0: This change does not remediate CVE-2026-39244. The vulnerable adm-zip@0.5.17 is a transitive dependency of onnxruntime-node (declared as adm-zip: ^0.5.16) and remains installed at bun.lock onnxruntime-node/adm-zip: adm-zip@0.5.17; adding a top-level adm-zip: 0.6.0 dependency runs a second, separate copy and does not override the transitive one. Since the app also never imports adm-zip directly, the new direct dependency is unused. Use a bun override (e.g. "overrides": { "adm-zip": "0.6.0" }) or update onnxruntime-node so the patched version actually replaces the vulnerable one, then re-scan with trivy.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 25:

<comment>This change does not remediate CVE-2026-39244. The vulnerable adm-zip@0.5.17 is a transitive dependency of onnxruntime-node (declared as `adm-zip: ^0.5.16`) and remains installed at bun.lock `onnxruntime-node/adm-zip: adm-zip@0.5.17`; adding a top-level `adm-zip: 0.6.0` dependency runs a second, separate copy and does not override the transitive one. Since the app also never imports adm-zip directly, the new direct dependency is unused. Use a bun override (e.g. `"overrides": { "adm-zip": "0.6.0" }`) or update onnxruntime-node so the patched version actually replaces the vulnerable one, then re-scan with trivy.</comment>

<file context>
@@ -20,5 +20,8 @@
     "dists:load-probe": "bun -e \"await import('./packages/plugin/dist/index.js'); await import('./packages/pi-plugin/dist/index.js'); console.log('dists LOAD OK')\""
+  },
+  "dependencies": {
+    "adm-zip": "0.6.0"
   }
 }
</file context>

Comment thread bun.lock

"miniflare/ws": ["ws@8.21.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g=="],

"onnxruntime-node/adm-zip": ["adm-zip@0.5.17", "", {}, "sha512-+Ut8d9LLqwEvHHJl1+PIHqoyDxFgVN847JTVM3Izi3xHDWPE4UtzzXysMZQs64DMcrJfBeS/uoEP4AD3HQHnQQ=="],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security Nested vulnerable version remains

When the workspace dependencies are installed or scanned, onnxruntime-node still resolves adm-zip@0.5.17 because its ^0.5.16 range cannot accept the new root 0.6.0 dependency, causing the targeted vulnerable version to remain installed and scanner-visible. How this was verified: The changed lockfile explicitly adds the nested onnxruntime-node/adm-zip@0.5.17 resolution alongside the root adm-zip@0.6.0 resolution.

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