cve.bz

CVE-2024-52005 git git: Improper Encoding or Escaping of Output

7.5 highEPSS 0.5%

High (7.5) in git git. EPSS 0.5% estimated probability of exploitation activity in the next 30 days.

On this page
Git is a source code management tool. When cloning from a server (or fetching, or pushing), informational or error messages are transported from the remote Git process to the client via the so-called "sideband channel". These messages will be prefixed with "remote:" and printed directly to the standard error output. Typically, this standard error output is connected to a terminal that understands ANSI escape sequences, which Git did not protect against. Most modern terminals support control sequences that can be used by a malicious actor to hide and misrepresent information, or to mislead the user into executing untrusted scripts. As requested on the git-security mailing list, the patches are under discussion on the public mailing list. Users are advised to update as soon as possible. Users unable to upgrade should avoid recursive clones unless they are from trusted sources.

Severity

CVSS 4.0

7.5 high
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 44th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-01-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-116 Improper Encoding or Escaping of Output
CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-52005 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-52005?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-52005?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-52005 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
git:gitthrough 2.40.4
git:gitfrom 2.41.0 through 2.41.3
git:gitfrom 2.42.0 through 2.42.4
git:gitfrom 2.43.0 through 2.43.6
git:gitfrom 2.44.0 through 2.44.3
git:gitfrom 2.45.0 through 2.45.3
git:gitfrom 2.46.0 through 2.46.3
git:gitfrom 2.47.0 through 2.47.1
git:gitfrom 2.48.0 through 2.48.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14gitno fix listedDEBIAN-CVE-2024-52005
Ubuntu22.04:LTS, 24.04:LTS, 25.10 and 5 moregitno fix listedUBUNTU-CVE-2024-52005
Red Hatenterprise_linux:8::appstreamgit, gitk, gitweb and 17 more0:2.43.5-3.el8_10RHSA-2025:8414
Red Hatenterprise_linux:9::appstreamgit, gitk, gitweb and 17 more0:2.47.1-2.el9_6RHSA-2025:7409
Red Hatenterprise_linux:10.0git, gitk, gitweb and 17 more0:2.47.1-2.el10_0RHSA-2025:7482
Red Hatrhel_eus:9.2::appstreamgit, gitk, gitweb and 17 more0:2.39.5-1.el9_2.1RHSA-2025:7641
Red Hatrhel_eus:9.4::appstreamgit, gitk, gitweb and 17 more0:2.43.5-1.el9_4.1RHSA-2025:7640
openSUSETumbleweedpython-dulwich1.2.21-1.1openSUSE-SU-2026:12603-1
AlmaLinux8git, gitk, gitweb and 12 more2.43.5-3.el8_10ALSA-2025:8414
AlmaLinux9git, gitk, gitweb and 12 more2.47.1-2.el9_6ALSA-2025:7409
AlmaLinux10git, gitk, gitweb and 12 more2.47.1-2.el10_0ALSA-2025:7482
Rocky Linux8git0:2.43.5-3.el8_10RLSA-2025:8414
Rocky Linux9git0:2.47.1-2.el9_6RLSA-2025:7409
Rocky Linux10git0:2.47.1-2.el10_0RLSA-2025:7482
Azure Linux2gitno fix listedAZL-56373
Azure Linux3gitno fix listedAZL-56370
Alpaquita23, streamgitno fix listedBELL-CVE-2024-52005

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is classified as moderate rather than important because it primarily affects informational messages rather than directly compromising repository integrity or executing arbitrary code. The issue arises from Git's failure to sanitize ANSI escape sequences in messages received over the sideband channel, which could allow a malicious remote repository to manipulate terminal output. However, exploitation requires user interaction, such as manually copying and executing misleading commands. Unlike higher-severity vulnerabilities, this does not provide direct unauthorized access, remote code execution, or privilege escalation, limiting its overall impact. The risk is further mitigated by best practices, such as avoiding recursive clones from untrusted sources.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10git-0:2.47.1-2.el10_0Fixed 2025-05-13RHSA-2025:7482
Red Hat Enterprise Linux 8git-0:2.43.5-3.el8_10Fixed 2025-06-03RHSA-2025:8414
Red Hat Enterprise Linux 9git-0:2.47.1-2.el9_6Fixed 2025-05-13RHSA-2025:7409
Red Hat Enterprise Linux 9.2 Extended Update Supportgit-0:2.39.5-1.el9_2.1Fixed 2025-05-15RHSA-2025:7641
Red Hat Enterprise Linux 9.4 Extended Update Supportgit-0:2.43.5-1.el9_4.1Fixed 2025-05-15RHSA-2025:7640
Red Hat Discovery 1.14discovery/discovery-server-rhel9:1.14.3-1748529279Fixed 2025-06-02RHSA-2025:8385
Red Hat Enterprise Linux 6gitOut of support scope
Red Hat Enterprise Linux 7gitWill not fix
Red Hat Fuse 7io.syndesis-syndesis-parentOut of support scope
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Will not fix
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-9Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-52005.

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • andrewd-cg/cve-2024-52005-poc 0 stars, Python, created
    Proof-of-Concept for CVE-2024-52005: ANSI escape sequence injection in Git. Demonstrates incorrect 'not_affected' VEX claims in hardened co…

Attack patterns (CAPEC)

  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High
  • CAPEC-41 Using Meta-characters in E-mail Headers to Inject Malicious Payloads Likelihood: High · Severity: High
  • CAPEC-93 Log Injection-Tampering-Forging Likelihood: High · Severity: High
  • CAPEC-134 Email Injection Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON