Credential Exposure Vulnerability in Git Package

git Updated 02 Oct 2025

Summary

14/01/2025
N/A
Yes i
Unrated
Not published

CVE-2024-50349: Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. Affects git across 3 version ranges.

< 2.40.4-r0 < 7725b8100ffbbff2750ee4d61a0fcc1f53a086e8 < c903985bf7e772e2d08275c1a95c8a55ab011577

Fixed in 2.40.4-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Git is a widely used distributed version control system that allows developers to track changes in source code during software development. It is known for its speed, scalability, and rich command set, which provides both high-level operations and full access to its internals. However, Git has a vulnerability that can expose user credentials when prompted for authentication via a terminal, particularly when using untrusted URLs.

Vulnerability Detail

The vulnerability, identified as CVE-2024-50349, arises when Git requests credentials through a terminal prompt without utilizing a credential helper. During this process, Git prints the host name for which the user is expected to provide a username and/or password. Attackers can exploit this by crafting URLs containing ANSI escape sequences, misleading users into entering their credentials for trusted Git hosting sites, while the credentials are actually sent to untrusted sites controlled by the attacker. This vulnerability affects multiple versions of Git across various Debian ecosystems.

How To Fix

Minimum fixed version

2.40.4-r0

This is the first release that contains the fix.

sudo apk add --upgrade git

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If users are unable to upgrade Git, they should avoid cloning from untrusted URLs, especially when performing recursive clones. This can help mitigate the risk of credential exposure until an upgrade is possible.

Conclusion

CVE-2024-50349 is a significant vulnerability in the Git package that can lead to credential exposure through misleading terminal prompts. Users are strongly advised to upgrade to the patched versions of Git to protect against this vulnerability. Until an upgrade is feasible, avoiding untrusted URLs is a crucial workaround.

See every vulnerability recorded for git →

Share this vulnerability

FAQ

CVE-2024-50349 is a vulnerability in Git that allows attackers to mislead users into providing their credentials through manipulated terminal prompts.

Any version of Git prior to the patched releases mentioned in the 'how_to_fix' section is potentially affected by this vulnerability.

If an upgrade is not possible, avoid using untrusted URLs for cloning repositories, especially recursive clones.

The vulnerability can trick users into entering their credentials for a trusted site, which are then sent to an untrusted site controlled by an attacker.

More information can be found in the official Git release notes and security advisories related to CVE-2024-50349.

Related vulnerabilities

Recent vulnerabilities recorded for git.

How To Fix

Minimum fixed version

2.40.4-r0

This is the first release that contains the fix.

sudo apk add --upgrade git

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback