Dev.to Security 🔐 Cybersecurity 👁 0 📖 3 min read

CVE-2026-63476: CVE-2026-63476: Unbounded Memory Allocation and Denial of Service in isomorphic-git Packfile Delta Parser

CVE-2026-63476: Unbounded Memory Allocation and Denial of Service in isomorphic-git Packfile Delta Parser Vulnerability ID: CVE-2026-63476 CVSS Score: 4.3 Published: 2026-11-23 CVE-2026-63476 is an uncontrolled reso

CVE-2026-63476: Unbounded Memory Allocation and Denial of Service in isomorphic-git Packfile Delta Parser

Vulnerability ID: CVE-2026-63476
CVSS Score: 4.3
Published: 2026-11-23

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.

TL;DR

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.

⚠️ Exploit Status: POC

Technical Details

  • 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

Affected Systems

  • isomorphic-git (< 1.38.6)
  • Node.js applications and browser runtimes utilizing isomorphic-git for cloning or fetching repositories
  • isomorphic-git: < 1.38.6 (Fixed in: 1.38.6)

Code Analysis

Commit: 823843d

Replace up-front Buffer.alloc(targetSize) in applyDelta with incremental chunk collection and post-validation Buffer.concat

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
 }

Commit: 5c37ea6

Squashed merge commit for bounded allocation fix in applyDelta

Exploit Details

  • GitHub: Official regression test case (tests/test-applyDelta-bounded-allocation.js) demonstrating a 2 GB targetSize delta header allocation attempt.

Mitigation Strategies

  • Upgrade isomorphic-git to version 1.38.6 or newer to eliminate up-front untrusted buffer pre-allocation.
  • Restrict git.clone() and git.fetch() targets to an allowlist of verified, trusted remote Git repositories.
  • Enforce strict TLS verification (HTTPS) for all Git transport connections to prevent Man-in-the-Middle packfile injection.
  • Isolate Git packfile processing inside dedicated worker processes with automatic restart policies to contain potential OOM crashes.

Remediation Steps:

  1. Audit project dependency trees (package-lock.json, yarn.lock, pnpm-lock.yaml) to identify all direct and transitive instances of isomorphic-git < 1.38.6.
  2. Run npm install isomorphic-git@^1.38.6 (or the equivalent yarn/pnpm command) to install the patched release.
  3. Rebuild and redeploy any browser bundles, serverless functions, or container images that package isomorphic-git.
  4. Verify the fix by checking that node_modules/isomorphic-git/src/utils/applyDelta.js accumulates operations in a chunks array before calling Buffer.concat.

References

Read the full report for CVE-2026-63476 on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.