Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-21532: Command Injection in ggit

0
High
VulnerabilityCVE-2024-21532cvecve-2024-21532
Published: Tue Oct 08 2024 (10/08/2024, 05:00:03 UTC)
Source: CVE Database V5
Product: ggit

Description

All versions of the package ggit are vulnerable to Command Injection via the fetchTags(branch) API, which allows user input to specify the branch to be fetched and then concatenates this string along with a git command which is then passed to the unsafe exec() Node.js child process API.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/21/2026, 23:00:53 UTC

Technical Analysis

CVE-2024-21532 is a command injection vulnerability found in all versions of the ggit package, specifically within the fetchTags(branch) API. This API accepts a branch name as input and concatenates it directly into a git command string, which is then executed using Node.js's child_process exec() function without proper sanitization or validation. Because exec() runs commands in a shell, an attacker can inject arbitrary shell commands by crafting malicious branch names. The vulnerability requires no privileges or user interaction, making it remotely exploitable over any interface that exposes this API. The CVSS v3.1 base score is 7.3, indicating high severity, with attack vector network, low attack complexity, no privileges required, no user interaction, and impacts on confidentiality, integrity, and availability. Although no public exploits are known yet, the nature of the vulnerability allows for remote code execution, which could lead to system compromise, data leakage, or service disruption. The lack of patches or mitigations currently published increases the urgency for users to implement workarounds or restrict access to vulnerable endpoints.

Potential Impact

The vulnerability enables remote attackers to execute arbitrary commands on systems running ggit, potentially leading to unauthorized access, data exfiltration, or disruption of services. Confidentiality may be compromised if sensitive data is accessed or leaked. Integrity can be affected if attackers modify code repositories or system files. Availability may be impacted if attackers execute destructive commands or disrupt git operations. Organizations relying on ggit for source code management or automation could face significant operational risks, including supply chain compromise or lateral movement within networks. The ease of exploitation and lack of authentication requirements increase the threat level, especially for publicly accessible services or CI/CD pipelines integrating ggit.

Mitigation Recommendations

Until an official patch is released, organizations should implement strict input validation and sanitization on any user-supplied branch names passed to the fetchTags API. Restrict network access to the ggit service to trusted users and internal networks only. Employ application-layer firewalls or runtime application self-protection (RASP) solutions to detect and block suspicious command injection patterns. Consider replacing calls to exec() with safer alternatives like execFile() or spawn() that do not invoke a shell, or refactor the code to avoid concatenating user input into shell commands. Monitor logs for unusual git command executions or shell activity. Keep dependencies up to date and subscribe to security advisories for ggit to apply patches promptly once available.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
snyk
Date Reserved
2023-12-22T12:33:20.123Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69bf1f9ff4197a8e3b06ff58

Added to database: 3/21/2026, 10:45:51 PM

Last enriched: 3/21/2026, 11:00:53 PM

Last updated: 3/22/2026, 1:58:51 AM

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses