Media

isomorphic-git allows unbounded memory allocation from attacker-controlled delta target size (DoS)

  • Publicada: 23.11.2026
  • Actualizado: 23.11.2026 23:17

Summary

When applying a delta object from a packfile, isomorphic-git reads a server-controlled targetSize and calls Buffer.alloc(targetSize) with no upper bound. A single malicious HTTP response to git.clone()/git.fetch() can force a ~2 GB allocation → memory exhaustion / DoS (process killed on memory-constrained hosts).

Details

src/utils/applyDelta.js:

js
const sourceSize = readVarIntLE(reader)
const targetSize = readVarIntLE(reader)   // attacker-controlled
…
target = Buffer.alloc(targetSize)

A pack with one OBJ_REF_DELTA whose header declares targetSize = 0x7FFFFFFF (~2 GB) and a 1-byte op causes the full allocation up front. The subsequent size-mismatch error is swallowed in GitPackIndex.fromPack, so on a host with spare RAM it silently wastes ~2 GB; on a small host the OS SIGKILLs the process.

Canonical git behavior (divergence)

git rejects the same 78-byte pack in ~96 ms — error: delta replay has gone wild / fatal: … failed to apply delta — with no large allocation and no hang (it bounds delta replay against the declared size rather than trusting it).

PoC

https://github.com/spiceoverflow/av4-oom — open in a Codespace; a single clone/fetch against the bundled server, run under --max-old-space-size=256:

[AV-4] *** OOM ALLOCATION CONFIRMED — Buffer.alloc(targetSize) RAN ***
[AV-4] External (Buffer) memory rose by 2048 MB during clone.

(The allocation is off-heap, so a Node heap cap does not mitigate it.)

Impact

A denial of service via unbounded memory allocation: a single response from a malicious or MitM'd server to git.clone()/git.fetch() forces a multi-gigabyte allocation, crashing the process on memory-constrained hosts.

Any application or service that clones or fetches from untrusted/compromised remotes with isomorphic-git — most acutely containers, serverless functions, and small VMs, where the OS OOM-kills the process.

Suggested fix

Don't pre-allocate the untrusted targetSize: build the result from the actual delta ops and validate the total against targetSize before concatenating (and/or cap it against the advertised pack size).

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm isomorphic-git < 1.38.6 1.38.6

Referencias

Puntuación CVSS 4.3/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
Debilidad (CWE)
CWE-400, CWE-789
Plataforma
npm
Paquete
isomorphic-git
Publicada
23.11.2026
Actualizado
23.11.2026 23:17

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-9x82-4j54-863h - CC BY 4.0

Historial de vulnerabilidades: isomorphic-git

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
4
Primera → última
09.2021 11.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Media 4

Divulgaciones por año

  1. 2021: 1
  2. 2022: 0
  3. 2023: 0
  4. 2024: 0
  5. 2025: 0
  6. 2026: 3
  1. isomorphic-git allows unbounded memory allocation from attacker-controlled delta target size (DoS) esta entrada
    Media · 4.3 CVE-2026-63476 < 1.38.6 1.38.6
  2. Media · 5.3 CVE-2021-30483 < 1.8.2 1.8.2

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.