CVE-2024-52005 The sideband payload is passed unfiltered to the terminal in git

High 7.5 Published Updated

Malicious remote messages can inject terminal escape sequences to mislead users into executing untrusted scripts during Git operations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-52005?

CVE-2024-52005 is a high-severity vulnerability in git, published on 15 Jan 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-150, CWE-116

Which versions are affected by CVE-2024-52005?

1 open source package ship an affected version, including git. It affects 1 product.

PackageAffectedFixed in
git BitnamiAll versions2.40.5, 2.41.4, 2.42.5, 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.2, 2.48.2
Linux distribution packages (39)
git AlmaLinux:10All versions2.47.1-2.el10_0
git-all AlmaLinux:10All versions2.47.1-2.el10_0
git-core AlmaLinux:10All versions2.47.1-2.el10_0
git-core-doc AlmaLinux:10All versions2.47.1-2.el10_0
git-credential-libsecret AlmaLinux:10All versions2.47.1-2.el10_0
git-daemon AlmaLinux:10All versions2.47.1-2.el10_0
git-email AlmaLinux:10All versions2.47.1-2.el10_0
git-gui AlmaLinux:10All versions2.47.1-2.el10_0
git-instaweb AlmaLinux:10All versions2.47.1-2.el10_0
git-subtree AlmaLinux:10All versions2.47.1-2.el10_0
git-svn AlmaLinux:10All versions2.47.1-2.el10_0
gitk AlmaLinux:10All versions2.47.1-2.el10_0
gitweb AlmaLinux:10All versions2.47.1-2.el10_0
perl-Git AlmaLinux:10All versions2.47.1-2.el10_0
perl-Git-SVN AlmaLinux:10All versions2.47.1-2.el10_0
git AlmaLinux:8All versions2.43.5-3.el8_10
git-all AlmaLinux:8All versions2.43.5-3.el8_10
git-core AlmaLinux:8All versions2.43.5-3.el8_10
git-core-doc AlmaLinux:8All versions2.43.5-3.el8_10
git-credential-libsecret AlmaLinux:8All versions2.43.5-3.el8_10
git-daemon AlmaLinux:8All versions2.43.5-3.el8_10
git-email AlmaLinux:8All versions2.43.5-3.el8_10
git-gui AlmaLinux:8All versions2.43.5-3.el8_10
git-instaweb AlmaLinux:8All versions2.43.5-3.el8_10
git-subtree AlmaLinux:8All versions2.43.5-3.el8_10
git-svn AlmaLinux:8All versions2.43.5-3.el8_10
gitk AlmaLinux:8All versions2.43.5-3.el8_10
gitweb AlmaLinux:8All versions2.43.5-3.el8_10
perl-Git AlmaLinux:8All versions2.43.5-3.el8_10
perl-Git-SVN AlmaLinux:8All versions2.43.5-3.el8_10
git AlmaLinux:9All versions2.47.1-2.el9_6
git-all AlmaLinux:9All versions2.47.1-2.el9_6
git-core AlmaLinux:9All versions2.47.1-2.el9_6
git-core-doc AlmaLinux:9All versions2.47.1-2.el9_6
git-credential-libsecret AlmaLinux:9All versions2.47.1-2.el9_6
git-daemon AlmaLinux:9All versions2.47.1-2.el9_6
git-email AlmaLinux:9All versions2.47.1-2.el9_6
git-gui AlmaLinux:9All versions2.47.1-2.el9_6
git-instaweb AlmaLinux:9All versions2.47.1-2.el9_6

Products include Git Git.

How do I fix CVE-2024-52005?

Upgrade git to a fixed version for your release line: 2.40.5, 2.41.4, 2.42.5 or 2.43.7.

Is CVE-2024-52005 being exploited?

There is no known exploitation of CVE-2024-52005 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as ALSA-2025:7409, ALSA-2025:7482, ALSA-2025:8414, AZL-56370, AZL-56373, BELL-CVE-2024-52005 and 18 more.

Is CVE-2024-52005 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free