SecurityContext

CVE-2024-50349: Git - Command Injection

  • Cve: CVE-2024-50349
  • Name: Git - Command Injection
  • Description: 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. When Git asks for credentials via a terminal prompt (i.e. without using any credential helper), it prints out the host name for which the user is expected to provide a username and/or a password. At this stage, any URL-encoded parts have been decoded already, and are printed verbatim. This allows attackers to craft URLs that contain ANSI escape sequences that the terminal interpret to confuse users e.g. into providing passwords for trusted Git hosting sites when in fact they are then sent to untrusted sites that are under the attacker's control. This issue has been patch via commits `7725b81` and `c903985` which are included in release versions v2.48.1, v2.47.2, v2.46.3, v2.45.3, v2.44.3, v2.43.6, v2.42.4, v2.41.3, and v2.40.4. Users are advised to upgrade. Users unable to upgrade should avoid cloning from untrusted URLs, especially recursive clones.
  • Impact: Attackers can deceive users into revealing passwords or credentials by confusing terminal output, leading to credential theft or social engineering.
  • Remediation: Upgrade to version v2.48.1 or later. If unable, avoid cloning from untrusted URLs, especially recursive clones.
  • Vulnerability type: command_injection
  • Vulnerability impact: information_disclosure
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 4.7
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
  • Epss score: 0.00648
  • Epss percentile: 0.51787
  • Assignee: [email protected]
  • Published at: 2025-01-14T19:15:32Z
  • Age in days: 679
  • Modified at: 2026-06-17T08:04:17Z
  • Patch available: yes
  • References total: 4
  • Products total: 2
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-50349
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-116Improper Encoding or Escaping of Output

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/git/git/commit/7725b8100ffbbff2750ee4d61a0fcc1f53a086e8Patch
https://github.com/git/git/commit/c903985bf7e772e2d08275c1a95c8a55ab011577Patch
https://github.com/git/git/security/advisories/GHSA-hmg8-h7qf-7cxrPatch, Vendor Advisory
https://lists.debian.org/debian-lts-announce/2025/01/msg00025.htmlMailing List, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
git:git= 2.48.0; >= 2.47.0, < 2.47.2; >= 2.46.3, < 2.46.3; >= 2.45.3, < 2.45.3; >= 2.44.3, < 2.44.3; >= 2.43.0, < 2.43.6; >= 2.42.0, < 2.42.4; >= 2.41.0, < 2.41.3; < 2.40.4nonvd/v1/products/git/git
debian:debian_linux= 11.0nonvd/v1/products/debian/debian_linux

Projects

RepositoryLink kindsIndexedUrl
git/gitcommit, fix, security_advisoryyes/v1/repositories/git/git

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Exposed hosts: 4739835
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports