Nov 23, 2026·10 min read·2 visits
Versions of isomorphic-git prior to 1.38.6 allocate memory directly from an unvalidated targetSize header field when unpacking Git delta objects. A crafted packfile from a malicious remote repository can trigger a 2 GB off-heap allocation per delta object, causing denial of service via out-of-memory process crashes.
CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.
isomorphic-git is a pure JavaScript implementation of Git designed to run in both Node.js and modern web browser environments. It provides programmatic APIs for standard Git operations such as git.clone(), git.fetch(), and packfile indexing without relying on native Git binaries. Because it frequently processes untrusted repository data over network transports in CI/CD runners, serverless functions, and browser-based IDEs, its binary stream parsers represent a primary attack surface.
CVE-2026-63476 (also tracked as GHSA-9x82-4j54-863h) is a memory allocation vulnerability classified under CWE-789 (Memory Allocation with Excessive Size Value) and CWE-400 (Uncontrolled Resource Consumption). The defect resides in src/utils/applyDelta.js, which is responsible for reconstructing full Git objects from delta-compressed stream fragments inside Git packfiles.
Prior to version 1.38.6, the delta unpacker extracted the declared targetSize variable-length integer from the incoming delta header and immediately invoked Buffer.alloc(targetSize). This allocation occurred before the parser read or validated the accompanying delta command stream to confirm that the operations actually yielded targetSize bytes of output.
An adversary controlling a remote Git server or positioned as a Man-in-the-Middle (MITM) on an unverified connection can transmit a synthetic delta header claiming a targetSize of 0x7FFFFFFF (approximately 2 GB) backed by a 1-byte payload. Upon processing this header, the client immediately allocates 2 GB of off-heap memory, terminating memory-constrained containers, micro-VMs, or serverless execution environments via the operating system Out-Of-Memory (OOM) killer.
To optimize network transfer and storage, Git packfiles utilize delta compression (OFS_DELTA and OBJ_DELTA object types). A delta object does not store a complete file; instead, it stores a stream of copy and insert instructions relative to a base object. Every Git delta stream begins with two variable-length Little-Endian Base 128 (LEB128) integers: sourceSize (the expected byte length of the base object) and targetSize (the expected byte length of the reconstructed object).
Following these two header integers, the delta stream contains a sequence of instruction opcodes. Opcodes with the most significant bit set (0x80) instruct the unpacker to copy a specific byte range from the base object buffer. Opcodes with the most significant bit cleared (0x01 through 0x7F) instruct the unpacker to read that exact number of literal bytes directly from the delta stream and append them to the output.
The root cause of CVE-2026-63476 is that applyDelta() trusted the declarative targetSize metadata in the delta header as an allocation size parameter prior to evaluating the instruction stream. If a delta contained more than a single operation (or if the first operation's output size did not equal targetSize), applyDelta() executed target = Buffer.alloc(targetSize) to create a fixed-size destination buffer, wrapped it in a BufferCursor, and iterated over the remaining operations.
This design creates an asymmetry between network payload size and client memory allocation. Encoding the integer 0x7FFFFFFF (2,147,483,647) in LEB128 requires only 5 bytes. Combined with a 1-byte sourceSize and a 2-byte insert instruction, an 8-byte payload forces a 2 GB allocation.
> [!NOTE]
> In Node.js, Buffer.alloc() allocates memory in C++ external space (off-heap) rather than inside the V8 JavaScript heap. Consequently, command-line mitigations such as --max-old-space-size do not restrict these allocations, and the process exceeds container cgroup limits before V8 garbage collection can intervene.
Furthermore, while applyDelta() verified if (targetSize !== tell) after exhausting the operation stream and threw an InternalError on mismatch, callers such as GitPackIndex.fromPack caught and suppressed these errors during multi-pass packfile indexing. On hosts with sufficient physical RAM to survive the initial spike, suppressing the exception allowed the oversized buffer reference or associated parsing state to linger in memory before garbage collection.
In versions of isomorphic-git prior to 1.38.6, src/utils/applyDelta.js implemented a pre-allocation strategy when reconstructing delta objects across multiple operations. The vulnerable implementation is shown below:
// Vulnerable implementation in src/utils/applyDelta.js (< 1.38.6)
export function applyDelta(delta, source) {
const reader = new GitReader(delta)
const sourceSize = reader.readVarInt()
const targetSize = reader.readVarInt()
if (source.byteLength !== sourceSize) {
throw new InternalError(
`applyDelta expected source buffer to be ${sourceSize} bytes but the provided buffer was ${source.byteLength} bytes`
)
}
let target
const firstOp = readOp(reader, source)
// Optimization for single-op deltas
if (firstOp.byteLength === targetSize) {
target = firstOp
} else {
// VULNERABLE: Pre-allocates untrusted targetSize directly off-heap
target = Buffer.alloc(targetSize)
const writer = new BufferCursor(target)
writer.copy(firstOp)
while (!reader.eof()) {
writer.copy(readOp(reader, source))
}
const tell = writer.tell()
if (targetSize !== tell) {
throw new InternalError(
`applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes`
)
}
}
return target
}Commit 823843d1cd19182df79bc907c767f5bcecb39a0b (merged via PR #2370 / commit 5c37ea69e9691183fc52d41ba7b6361263e9fedd) resolves the vulnerability by removing the up-front Buffer.alloc(targetSize) call and accumulating the output slices produced by each individual operation into an array.
File: src/utils/applyDelta.js
@@ -23,21 +23,26 @@ export function applyDelta(delta, source) {
if (firstOp.byteLength === targetSize) {
target = firstOp
} else {
- // Otherwise, allocate a fresh buffer and slices
- target = Buffer.alloc(targetSize)
- const writer = new BufferCursor(target)
- writer.copy(firstOp)
+ // Build the result from the delta ops instead of pre-allocating `targetSize`.
+ // `targetSize` comes from the delta header and may not match the actual op output,
+ // so allocating it up front can reserve far more memory than the ops produce.
+ // Building from the ops bounds memory to the real output size; the size check below
+ // still validates the total before concatenating.
+ const chunks = [firstOp]
+ let tell = firstOp.byteLength
while (!reader.eof()) {
- writer.copy(readOp(reader, source))
+ const op = readOp(reader, source)
+ chunks.push(op)
+ tell += op.byteLength
}
- const tell = writer.tell()
if (targetSize !== tell) {
throw new InternalError(
`applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes`
)
}
+ target = Buffer.concat(chunks, targetSize)
}
return target
}In the patched code, memory allocation is strictly bounded by the actual data yielded by readOp(reader, source). Note that for copy operations, readOp() returns a zero-copy source.slice() view pointing to the existing base buffer, and for insert operations, it returns a slice of the incoming delta buffer.
As the while (!reader.eof()) loop executes, tell tracks the cumulative byte length of all concrete operation slices pushed to chunks. No contiguous target allocation occurs during the parsing loop. Only after the stream reaches EOF and if (targetSize !== tell) confirms that the sum of the chunks matches targetSize does the function invoke Buffer.concat(chunks, targetSize).
This fix completely neutralizes the header-inflation attack vector. If a malicious delta header specifies a 2 GB targetSize with a 1-byte operation stream, the loop finishes with tell === 1, the validation check 2147483647 !== 1 triggers immediately, and InternalError is thrown before Buffer.concat() is ever reached.
Exploiting CVE-2026-63476 requires a victim process using isomorphic-git to fetch or clone from an attacker-controlled Git server, or over an unencrypted network path susceptible to MITM tampering. No authentication or special privileges on the client system are necessary (PR:N), though the client application must initiate the outbound Git transaction (UI:R).
During a git.clone() or git.fetch() call, the remote server responds to the client's git-upload-pack request by streaming a binary packfile (PACK). Within this packfile, the attacker includes one or more delta-encoded objects (OBJ_OFS_DELTA type 6 or OBJ_REF_DELTA type 7).
To construct the exploit payload for the delta object body, the attacker encodes sourceSize to match a valid base object in the packfile (e.g., 0 bytes for an empty base blob) using LEB128 encoding. Next, the attacker encodes targetSize as 0x7FFFFFFF (2,147,483,647 bytes), which serializes to the 5-byte LEB128 sequence [0xFF, 0xFF, 0xFF, 0xFF, 0x07]. Finally, the attacker appends a minimal delta instruction, such as [0x01, 0x00], which commands the parser to insert a single literal null byte.
The unit test introduced in __tests__/test-applyDelta-bounded-allocation.js demonstrates how this 8-byte buffer triggers the flaw directly via the internal API:
import { applyDelta } from 'isomorphic-git/internal-apis'
function varIntLE(n) {
const bytes = []
do {
let byte = n & 0x7f
n = Math.floor(n / 128)
if (n) byte |= 0x80
bytes.push(byte)
} while (n)
return Buffer.from(bytes)
}
// Construct the malformed delta stream:
// 1. sourceSize = 0 (1 byte)
// 2. targetSize = 0x7fffffff / ~2 GB (5 bytes)
// 3. Insert opcode: 1 byte length (0x01) followed by literal 0x00 (2 bytes)
const delta = Buffer.concat([
varIntLE(0),
varIntLE(0x7fffffff),
Buffer.from([0x01, 0x00]),
])
// In isomorphic-git < 1.38.6, this allocates 2 GB of off-heap memory
// before throwing the size mismatch error.
applyDelta(delta, Buffer.alloc(0))When a vulnerable version of isomorphic-git parses this delta object, firstOp.byteLength evaluates to 1, which does not equal targetSize (2147483647). Execution enters the else branch and invokes Buffer.alloc(2147483647), zero-filling 2 GB of physical memory and crashing constrained runtimes.
CVE-2026-63476 is assigned a CVSS v3.1 base score of 4.3 (Medium) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L. The vulnerability strictly affects system availability (A:L) without permitting out-of-bounds memory reads (C:N) or arbitrary memory corruption (I:N), as Node.js bounds-checks Buffer.alloc() and zero-initializes the underlying memory allocation.
The primary operational impact occurs in multi-tenant cloud services, CI/CD build pipelines, and serverless functions (such as AWS Lambda, Cloudflare Workers, or containerized microservices) that use isomorphic-git to process user-supplied repository URLs. In these environments, worker nodes typically run with memory limits between 128 MB and 2 GB.
When a single delta header forces a 2 GB off-heap allocation, the container immediately breaches its cgroup memory ceiling. The Linux kernel OOM killer terminates the entire Node.js runtime process with SIGKILL. If the application processes multiple tasks concurrently within the same Node.js event loop, an exploit triggered by one tenant disrupts all in-flight operations running in that worker process.
On larger servers where physical memory exceeds 2 GB, the behavior differs due to error handling in GitPackIndex.fromPack. Because fromPack catches and ignores certain object resolution exceptions while indexing packfiles, a malicious packfile containing multiple inflated delta headers can force repeated 2 GB allocations that degrade host performance and exhaust system swap space without surfacing an immediate fatal exception to the top-level caller.
As of this analysis, the Exploit Prediction Scoring System (EPSS) assigns CVE-2026-63476 a score of 0.00398 (0.40%, 34.81st percentile), and it is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
The definitive remediation for CVE-2026-63476 is to upgrade isomorphic-git to version 1.38.6 or later. Version 1.38.6 modifies applyDelta() to accumulate delta operation chunks lazily and verify the total unpacked length against targetSize prior to concatenating the final output buffer.
Update the dependency using your standard Node.js package manager:
# Using npm
npm install isomorphic-git@^1.38.6
# Using Yarn
yarn add isomorphic-git@^1.38.6
# Using pnpm
pnpm add isomorphic-git@^1.38.6> [!WARNING]
> Configuring Node.js V8 heap flags such as --max-old-space-size does not mitigate this vulnerability on unpatched versions. Because Buffer.alloc() reserves memory outside the V8 heap in external ArrayBuffer space, V8 heap limits do not intercept the allocation.
For environments where upgrading is temporarily blocked, administrators must implement architectural controls around how isomorphic-git connects to upstream remotes:
git.clone() or git.fetch() operations targeting arbitrary user-supplied URLs.git:// or http:// protocols to prevent network-level MITM attackers from injecting malformed packfile deltas into transit streams.isomorphic-git inside isolated, short-lived worker processes or dedicated sandboxed containers so that an OOM crash does not terminate the primary application server.CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
isomorphic-git isomorphic-git | < 1.38.6 | 1.38.6 |
| Attribute | Detail |
|---|---|
| Vulnerability ID | CVE-2026-63476 / GHSA-9x82-4j54-863h |
| Weakness Class | CWE-789 (Memory Allocation with Excessive Size Value) / CWE-400 |
| Affected Component | isomorphic-git (< 1.38.6) - src/utils/applyDelta.js |
| CVSS v3.1 Score | 4.3 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L) |
| EPSS Score | 0.40% (34.81st Percentile) |
| Primary Impact | Remote Denial of Service via ~2 GB Off-Heap Memory Allocation |
| Exploit Status | Proof-of-Concept (Unit test available in official repository) |
| CISA KEV Status | Not Listed |
The product allocates memory based on an untrusted, uncontrolled, or unvalidated size value, resulting in excessive consumption of system resources.
CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.
CVE-2026-63410 (GHSA-vp2j-gqfm-r3cf) is a compiler-induced timing side-channel vulnerability in the secp256k1-native Ruby C extension. When compiled with GCC 14.x or 15.x at optimization level -O2, the compiler reconstructs boolean predicates from branchless bitwise multiplexer routines and emits secret-dependent conditional jump instructions (je/jne). During elliptic curve scalar multiplication in the Montgomery ladder, these conditional branches create observable execution timing variations correlated with individual bits of secret private keys or signing nonces.
CVE-2026-133469 is an improper authentication and input type validation vulnerability in the xo-server component of Vates Xen Orchestra and Xen Orchestra Appliance (XOA). Due to Express cookie-parser JSON deserialization combined with loose truthiness validation and unvalidated Redis query construction, an unauthenticated attacker can supply an empty JSON object cookie (authenticationToken=j:{}) to bypass authentication and hijack the first valid active session token stored in the database. This flaw is actively exploited in the wild to gain administrative control over Xen Orchestra deployments and execute root-level commands on underlying XCP-ng and XenServer hypervisors.
CVE-2026-22816 (GHSA-w78c-w6vf-rw82) is a high-severity flaw in Gradle's dependency resolution engine affecting versions prior to 8.14.4 and versions 9.0.0 through 9.2.1. Due to improper error handling when transient network errors or connection failures exhaust their retry limits, Gradle fails to mark unreachable repositories as disabled and does not abort the resolution queue. Instead, it silently falls through to subsequent repositories configured in the build script. This behavior enables dependency confusion and supply chain attacks when an internal or primary repository experiences connectivity issues, unresolvable DNS, or domain registration lapses.
Gradle versions prior to 8.14.4 and 9.3.0 fail to classify certain fatal network transport exceptions, such as UnknownHostException and NoHttpResponseException, as critical failures during dependency resolution. When these exceptions occur and retry thresholds are exhausted, Gradle fails to disable the unreachable primary repository and instead falls through to subsequent repositories configured in the build script. An attacker capable of disrupting connectivity to an upstream repository can force the build tool to fetch malicious artifacts with matching coordinates from a downstream, untrusted repository.
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.