CVE-2024-37904: Go Git Unbounded Memory Clone

Cloning a Git repository into an unbounded memory storage (`memory.NewStorage()`) can lead to Denial of Service (DoS) due to memory exhaustion if an attacker supplies a large repository. Ensure you use an on-disk storage model (`filesystem.NewStorage`) or implement explicit file count and size limits.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Goβ
greprules fetch cve-2024-37904-go-git-unbounded-memory-clone --engine opengrep

Description

Cloning a Git repository into an unbounded memory storage (`memory.NewStorage()`) can lead to Denial of Service (DoS) due to memory exhaustion if an attacker supplies a large repository. Ensure you use an on-disk storage model (`filesystem.NewStorage`) or implement explicit file count and size limits.