Jun 15, 2026·6 min read·110 visits
Missing binary integrity verification in esbuild's Deno installer allows unauthenticated remote code execution via a poisoned registry configuration.
An issue was discovered in the Deno integration of the esbuild package. The module fails to verify the integrity of downloaded native binary packages from NPM registries before writing and executing them on the local filesystem. This allows an attacker who controls the NPM_CONFIG_REGISTRY environment variable or intercepts the network connection to execute arbitrary native code on the host machine.
The Deno integration module of the esbuild package downloader exposes an unauthenticated remote code execution vulnerability. When running in a Deno environment, esbuild retrieves platform-specific native binaries from an NPM registry. The vulnerability arises because the installer fails to perform cryptographic signature or integrity verification on the downloaded tarball before writing the binary to the local system and executing it.
An attacker can trigger this vulnerability by manipulating environment variables such as NPM_CONFIG_REGISTRY to point to a malicious server, or by executing a man-in-the-middle attack on the network path. Because Deno applications frequently execute within high-privilege pipelines or developer environments, this lack of validation presents a substantial initial access and execution hijacking vector.
The weakness is classified under CWE-494 (Download of Code Without Integrity Check) and CWE-426 (Untrusted Search Path). It impacts all versions of esbuild starting from 0.17.0 up to, but excluding, version 0.28.1.
The root cause of this security flaw lies in the discrepancy between how the Node.js installer and the Deno installer wrapper verify binary payloads. The Node.js implementation enforces checksum integrity checks using a hardcoded JSON manifest containing SHA-256 hashes for each architecture. In contrast, the Deno installer implemented in lib/deno/mod.ts completely lacks any integrity checks or validation routines.
When a Deno application initializes esbuild, the module executes the installFromNPM helper function to check if the platform-specific native binary is available locally. If the binary is missing, the code queries the environment for the NPM_CONFIG_REGISTRY variable to determine the base download URL. If this variable is defined, the installer uses it to build the request path; otherwise, it defaults to the official npmjs registry.
Once the URL is constructed, the module issues an HTTP request using Deno's global fetch API. It reads the response body as an ArrayBuffer and immediately extracts the target executable using a custom tar-gzip extractor. No validation is conducted against the binary content or the archive structure before writing the executable to disk with read-write-execute permissions (0o755).
To understand the exact breakdown, we examine the vulnerable code path located in lib/deno/mod.ts within the affected version range. The implementation constructs the endpoint and fetches the binary archive using the following sequence:
// Affected Code: lib/deno/mod.ts
async function installFromNPM(name: string, subpath: string): Promise<string> {
const { finalPath, finalDir } = getCachePath(name);
try { await Deno.stat(finalPath); return finalPath } catch (e) {}
// The URL construction relies directly on the environment variable
const npmRegistry = Deno.env.get("NPM_CONFIG_REGISTRY") || "https://registry.npmjs.org";
const url = `${npmRegistry}/${name}/-/${name.replace("@esbuild/", "")}-${version}.tgz`;
// Unchecked remote download occurs here
const buffer = await fetch(url).then(r => r.arrayBuffer());
const executable = extractFileFromTarGzip(new Uint8Array(buffer), subpath);
// Writing the extracted binary with executable permissions
await Deno.mkdir(finalDir, { recursive: true, mode: 0o700 });
await Deno.writeFile(finalPath, executable, { mode: 0o755 });
return finalPath;
}In contrast, the Node.js implementation in lib/npm/node-install.ts enforces validation of the payload bytes using a built-in cryptographic hashing function. This ensures that even if a registry mirror is compromised or spoofed, the target environment refuses to write or execute anomalous binaries:
// Node.js Implementation: lib/npm/node-install.ts
function binaryIntegrityCheck(pkg: string, subpath: string, bytes: Uint8Array): void {
const hash = crypto.createHash('sha256').update(bytes).digest('hex');
const key = `${pkg}/${subpath}`;
const expected = packageJSON['esbuild.binaryHashes'][key];
if (!expected) throw new Error(`Missing hash for "${key}"`);
if (hash !== expected) throw new Error(`Hash mismatch for "${key}"`);
}The fix introduced in version 0.28.1 ports this cryptographic checksum verification to the Deno implementation. It resolves the vulnerability by mapping the downloaded bytes against the same static manifest hashes before the local filesystem write occurs. This ensures parity in security postures across both Node.js and Deno execution environments.
The exploitation of GHSA-GV7W-RQVM-QJHR relies on hijacking the source location of the downloaded package. In an enterprise or automated environment, an attacker can poison the NPM_CONFIG_REGISTRY environment variable to point to a malicious server. Alternatively, in a shared host or developer environment, the attacker can leverage local environment mutation permissions to force this redirection.
The attacker prepares a mock registry that returns a crafted gzip tarball containing a malicious script or binary disguised as the native executable. When installFromNPM is triggered, it requests the package from the malicious endpoint. The victim's application downloads and decompresses the payload, subsequently executing it with the active user permissions.
Below is a flow diagram illustrating the hijack sequence from environment poisoning to remote code execution:
This architecture guarantees that any environment in which Deno runs without strict permissions is susceptible to complete compromise. If Deno is launched with broad system permissions, the executed script can capture secrets, perform network reconnaissance, or establish persistence.
The security impact of this vulnerability is high, carrying a CVSS v3.1 score of 8.1. The attack vector is network-based, but exploitation requires specific conditions relating to environment manipulation or local access, which bounds the complexity. However, successful exploitation yields unauthenticated arbitrary code execution under the context of the running Deno process.
In automated environments such as continuous integration (CI) pipelines or automated deployment servers, Deno commands are often run with high privileges. A compromise in these contexts can lead to supply chain taint, exfiltration of sensitive environment variables, or unauthorized infrastructure control. Because the vulnerability involves the execution of native code, it evades standard Deno runtime limits if those flags are configured loosely.
As of current intelligence, this vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog, nor is there active ransomware usage reported. However, due to the ease of constructing a proof-of-concept, development teams should prioritize remediation.
The primary and recommended mitigation is upgrading esbuild to version 0.28.1 or higher. This update introduces mandatory cryptographic verification using a static mapping of binary hashes. If upgrading is not immediately possible, security teams should implement restrictive runtime configurations to isolate the vulnerability.
Developers should avoid using the --allow-all or -A flags when executing untrusted or unverified Deno applications. Specifically, omitting or constraining the --allow-run permission blocks the Deno process from spawning the downloaded executable, neutralizing the remote code execution vector. Similarly, restricting the --allow-env permission prevents the application from reading a poisoned NPM_CONFIG_REGISTRY variable.
Additionally, implementing strict network egress controls ensures that Deno installers can only communicate with trusted, verified artifact repositories. Internal build environments should use read-only configurations for system-wide environment variables to prevent unauthorized modifications to registry pathways.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
esbuild (Deno module) evanw | >= 0.17.0, < 0.28.1 | 0.28.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-494, CWE-426 |
| Attack Vector | Network / Local Environment Manipulation |
| CVSS Score | 8.1 (High) |
| Exploit Status | Proof of Concept (PoC) available |
| CISA KEV Status | Not Listed |
| Impact | Remote Code Execution (RCE) |
The application downloads source code or executable binaries from a remote source but does not verify that the code's integrity matches an expected cryptographic hash.
A race condition in Next.js versions 16.3.0 through 16.4.4 allows cross-request cache poisoning and unauthorized information disclosure across root parameters. When an application invokes the same `'use cache'` function both directly during rendering and wrapped inside `unstable_cache()`, a concurrent `unstable_cache()` request arriving during a cold start cache fill joins the in-flight execution. Because the `unstable_cache()` execution context lacks root parameter tracking, the parameter mismatch verification fails, causing `unstable_cache()` to persist root-parameter-scoped data under a global cache key.
CVE-2026-128074 is an algorithmic complexity and Regular Expression Denial of Service (ReDoS) vulnerability in Nuxt versions 4.6.0 through 4.6.3. The flaw resides in the server-side rendering (SSR) runtime components responsible for payload URL generation and experimental early 404 route evaluation. By sending unauthenticated HTTP requests containing long sequences of repeated forward slashes followed by a non-slash character, an attacker can force the V8 regular expression engine into quadratic O(N^2) backtracking, blocking the single-threaded Node.js event loop and degrading application availability.
CVE-2026-128075 (GHSA-96x6-fvhx-49hg) is an information disclosure vulnerability in the Nuxt framework affecting versions 3.0.0 prior to 4.6.4. During Server-Side Rendering (SSR), unhandled non-HTTP exceptions thrown within pages, plugins, or route middleware are automatically wrapped using createError without being flagged as unhandled. Consequently, the production SSR serializer treats these internal exceptions as deliberate public HTTP errors and embeds their raw message and data properties—which frequently contain internal URLs, API credentials, and upstream response payloads—directly into the client-accessible __NUXT_DATA__ hydration state and JSON error responses.
CVE-2026-128076 is an improper encoding and delimiter injection vulnerability in the Nuxt framework affecting Server Components (NuxtIsland). The flaw serves as an incomplete fix for CVE-2026-46342, where the underlying object hashing routine fails to escape structural delimiters in property keys and string values. This enables attackers to craft distinct sets of component properties that resolve to an identical `/__nuxt_island/<Name>_<hash>.json` route path. In deployments relying on static prerendering or path-only CDN caching, this hash collision permits cache poisoning, content substitution, and Cross-Site Scripting (XSS) if island props flow into unescaped HTML sinks.
CVE-2026-128072 (GHSA-x2wv-5868-p7v2) is an origin validation vulnerability (CWE-346) in the Nuxt framework affecting the development middleware of @nuxt/webpack-builder and @nuxt/rspack-builder. Prior to version 4.6.4, the internal same-origin verification logic evaluated Sec-Fetch-Site, Origin, and Referer headers without first validating that the HTTP Host header belonged to an authorized hostname allowlist. This flaw allows a remote attacker to execute a DNS rebinding attack against a developer's local workstation, bypassing same-origin protections to read compiled client-side JavaScript chunks, inline source maps, local filesystem paths, and embedded client configuration values.
CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.