Pin transitive esbuild to 0.28.1 via pnpm override#158
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix Dependabot vulnerability alert for esbuild
Pin transitive esbuild from 0.28.0 to 0.28.1 via pnpm override
Jun 17, 2026
jcstein
approved these changes
Jun 17, 2026
Member
|
@copilot resolve the merge conflicts in this pull request |
Contributor
Author
Resolved the merge conflicts by merging |
Copilot
AI
changed the title
Pin transitive esbuild from 0.28.0 to 0.28.1 via pnpm override
Pin transitive esbuild to 0.28.1 via pnpm override
Jun 17, 2026
jcstein
approved these changes
Jun 17, 2026
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.
Dependabot flagged
esbuild@0.28.0(GHSA-gv7w-rqvm-qjhr) viapnpm-lock.yaml; the minimum non-vulnerable target is0.28.1. This change updates resolution to the patched version without upgrading higher-level toolchain packages.Dependency remediation
esbuildresolution to the patched release.Lockfile resolution update
pnpm-lock.yamlsovite/vocs/wakupaths that previously referencedesbuild@0.28.0now resolve toesbuild@0.28.1.esbuild@0.28.0resolution is replaced by override mapping.Reachability assessment
esbuilddownload/execution path (NPM_CONFIG_REGISTRY, Deno module installer).NPM_CONFIG_REGISTRYorESBUILD_BINARY_PATHin project code.vocs/vite→esbuild), not a direct Deno runtime integration.Confidence: High.
Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>Withdrawn Advisory: esbuild: Missing binary integrity verification in Deno module enables remote code execution via NPM_CONFIG_REGISTRY</alert_title>
<alert_description>## Withdrawn Advisory
This advisory has been withdrawn because the affected package was incorrectly identified and the actual affected package is not in a supported ecosystem. This link is maintained to preserve external references.
Original Description
Summary
The esbuild Deno module (
lib/deno/mod.ts) downloads native binary executables from an npm registry and writes them to disk with executable permissions (0o755) without performing any integrity verification (e.g., SHA-256 hash check). The Node.js equivalent (lib/npm/node-install.ts) includes a robustbinaryIntegrityCheck()function that verifies SHA-256 hashes against hardcoded expected values frompackage.json, but this protection was never implemented for the Deno distribution.When the
NPM_CONFIG_REGISTRYenvironment variable is set, the Deno module constructs a download URL using this attacker-influenced value and fetches a native binary from it. Because no integrity check is performed, an attacker who can control this environment variable (common in CI/CD pipelines, shared development environments, or corporate networks with custom npm registries) can supply a malicious binary that will be downloaded, written to disk, and executed with the privileges of the Deno process, achieving full remote code execution.Details
Vulnerable code path —
lib/deno/mod.tslines 62–82:Missing protection — The Node.js equivalent at
lib/npm/node-install.tslines 228–234:This function is called in both the
installUsingNPM()path (line 131) and thedownloadDirectlyFromNPM()path (line 243), but no equivalent exists in the Deno module. Searching the entire git history confirmsbinaryIntegrityCheck,binaryHashes,sha256, andhashhave never appeared inlib/deno/mod.ts.Execution flow after download: The binary returned by
installFromNPM()is passed tospawn()at line 291 of the same file:Attack vector: The
NPM_CONFIG_REGISTRYenvironment variable is a standard npm configuration variable widely used in enterprise CI/CD pipelines to point to internal artifact repositories (Artifactory, Nexus, Verdaccio, etc.). An attacker who can inject or modify this variable in a build environment (e.g., via CI config injection, shared environment, or compromised registry) can redirect the download to a server they control and serve a trojaned native binary.PoC
Prerequisites: Deno runtime, Node.js (for fake registry)
Step 1: Create a fake npm registry that serves a malicious binary:
Step 2: Run the PoC with
NPM_CONFIG_REGISTRYpointing to the fake server: