CVE-2024-52005
NoneCVSS
—
EPSS
0.5%
Published
Jan 15, 2025
CISA due date
—
Cloudanix analysis
A flaw in how Git displays messages from remote servers can let attackers trick your terminal into hiding warnings or running dangerous commands when you copy code from an untrusted source.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Other
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Git client fails to sanitize ANSI escape sequences in sideband channel messages from remote servers, allowing direct printing of control sequences to the user's terminal via stderr during clone, fetch, or push operations.
Why it matters to the business
Attackers can mislead users into running untrusted commands or hide critical error information during routine source code operations, increasing risk of supply chain compromise in environments relying on untrusted repositories; high prevalence of Git makes widespread exposure likely.
How an attack unfolds
An attacker hosts a malicious Git server that injects ANSI control sequences into informational or error messages sent over the sideband channel; when a victim clones, fetches, or pushes from this server the sequences reach the terminal and can conceal output, prompt unsafe actions, or execute scripts.
How to fix it
Upgrade python-django, python-django-bash-completion, and python-django-doc packages to version 1.8.7-1.el7 or later on Red Hat OpenStack 7 systems; users unable to upgrade must avoid recursive clones from untrusted sources.
How to confirm the fix worked
Confirm package versions match or exceed the fixed releases listed for each affected Red Hat package; test by connecting to a server emitting ANSI sequences and verifying they no longer appear in terminal output.
Typical attack path
- Set up a Git server that returns crafted sideband messages containing ANSI escapes
- Trick a victim into cloning, fetching, or pushing from the malicious remote
- Sequences manipulate the terminal display or induce the user to run attacker-chosen commands
- Payload executes or further social engineering succeeds without user realizing the source
How to detect it
Review terminal logs and shell history for unexpected ANSI sequences or commands executed during Git operations; inspect network traffic or Git protocol traces for sideband messages containing escape characters from untrusted remotes.
What your security team should do
- Apply the 1.8.7-1.el7 updates immediately on all listed Red Hat OpenStack 7 systems
- Audit internal Git workflows to restrict clones from untrusted remotes until patches are deployed
- Monitor EPSS and KEV status for any increase in exploit activity
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | git | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-all | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-core | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-core-doc | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-credential-libsecret | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-daemon | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-email | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-gui | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-instaweb | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-subtree | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | git-svn | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | gitk | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | gitweb | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | perl-Git | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:10 | perl-Git-SVN | 0 | 2.47.1-2.el10_0 |
| AlmaLinux:8 | git | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-all | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-core | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-core-doc | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-credential-libsecret | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-daemon | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-email | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-gui | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-instaweb | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-subtree | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | git-svn | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | gitk | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | gitweb | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | perl-Git | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:8 | perl-Git-SVN | 0 | 2.43.5-3.el8_10 |
| AlmaLinux:9 | git | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-all | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-core | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-core-doc | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-credential-libsecret | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-daemon | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-email | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-gui | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-instaweb | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-subtree | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | git-svn | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | gitk | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | gitweb | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | perl-Git | 0 | 2.47.1-2.el9_6 |
| AlmaLinux:9 | perl-Git-SVN | 0 | 2.47.1-2.el9_6 |
| Bitnami | git | 0 | 2.40.5 |
| Bitnami | git | 2.48.0 | 2.48.2 |
| Chainguard | git | 0 | 2.49.0-r0 |
| Chainguard | git-completion | 0 | 2.49.0-r0 |
| Chainguard | git-daemon | 0 | 2.49.0-r0 |
| Chainguard | git-doc | 0 | 2.49.0-r0 |
| Chainguard | git-email | 0 | 2.49.0-r0 |
| Chainguard | git-iamguarded-compat | 0 | 2.49.0-r0 |
| Chainguard | git-p4 | 0 | 2.49.0-r0 |
| Debian:11 | git | 0 | No fix |
| Debian:12 | git | 0 | No fix |
| Debian:13 | git | 0 | No fix |
| Ubuntu:20.04:LTS | git | 0 | No fix |
| Ubuntu:22.04:LTS | git | 0 | No fix |
| Ubuntu:24.04:LTS | git | 0 | No fix |
| Ubuntu:24.10 | git | 0 | No fix |
| Ubuntu:25.04 | git | 0 | No fix |
| Ubuntu:25.10 | git | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | git | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | git | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | git | 0 | No fix |
| Wolfi | git | 0 | 2.49.0-r0 |
| Wolfi | git-completion | 0 | 2.49.0-r0 |
| Wolfi | git-daemon | 0 | 2.49.0-r0 |
| Wolfi | git-doc | 0 | 2.49.0-r0 |
| Wolfi | git-email | 0 | 2.49.0-r0 |
| Wolfi | git-iamguarded-compat | 0 | 2.49.0-r0 |
| Wolfi | git-p4 | 0 | 2.49.0-r0 |
Related vulnerabilities
- CVE-2025-48384 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2024-52006 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2024-50349 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2022-25648 The package git before 1.11.0 are vulnerable to Command Injection via git argument… Also affects git
- CVE-2014-9390 Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x… Also affects git
- CVE-2017-15298 Git through 2.14.2 mishandles layers of tree objects, which allows remote attackers to… Also affects git
- CVE-2017-1000117 A malicious third-party can give a crafted "ssh://..." URL to an unsuspecting victim, and… Also affects git
- CVE-2017-14867 Git before 2.10.5, 2.11.x before 2.11.4, 2.12.x before 2.12.5, 2.13.x before 2.13.6, and… Also affects git