top of page
Betterworld Logo

Critical GitHub Desktop Vulnerability Exposes User Credentials to Attackers

Writer's picture: John JordanJohn Jordan

A recent security vulnerability in GitHub Desktop and related Git projects has raised alarms among developers and cybersecurity experts. This flaw allows malicious actors to exploit improperly handled text-based protocols, potentially leading to unauthorized access to user credentials. The vulnerabilities were discovered by a security researcher during the GitHub Bug Bounty program and have prompted immediate action from GitHub and Git developers to mitigate the risks.

GitHub Desktop | BetterWorld Technology

Key Takeaways

  • Multiple vulnerabilities identified in GitHub Desktop and related projects.

  • Exploitation could lead to unauthorized access to user credentials.

  • Immediate patches and mitigations have been implemented by GitHub.

Overview of Vulnerabilities

The vulnerabilities primarily stem from the Git Credential Protocol, which is designed to retrieve user credentials from a credential helper. Improper handling of messages exchanged between Git and the credential helper has led to several critical vulnerabilities:

  1. CVE-2025-23040: GitHub Desktop is vulnerable to credential leaks via maliciously crafted remote URLs, allowing attackers to exploit carriage return smuggling.

  2. CVE-2024-50338: The Git Credential Manager is susceptible to credential leakage due to improper parsing of carriage return characters in remote URLs.

  3. CVE-2024-53263: Git Large File Storage (LFS) fails to validate embedded control characters, enabling credential retrieval through crafted HTTP URLs.

  4. CVE-2024-53858: The GitHub CLI can leak authentication tokens to non-GitHub hosts during recursive repository cloning.

How the Exploits Work

The vulnerabilities exploit the way Git and GitHub Desktop handle newline and carriage return characters. For instance, by injecting a carriage return character into a crafted URL, an attacker can trick GitHub Desktop into sending credentials for a different host than intended. This misinterpretation can lead to secret exfiltration, allowing unauthorized access to sensitive information.

Response and Mitigation

In response to these vulnerabilities, GitHub and Git developers have implemented several mitigations:

  • Defense-in-Depth Validation: A new configuration option, credential.protectProtocol, has been introduced to reject credentials containing carriage return characters.

  • Credential Helper Revisions: GitHub Codespaces has updated its credential helper to validate requested hosts before sharing credentials.

  • Input Sanitization: GitHub Desktop and Git Credential Manager have enhanced input sanitization to prevent carriage return smuggling.

Recommendations for Users

To protect against these vulnerabilities, users are advised to:

  • Update to the latest version of GitHub Desktop and related tools to ensure all patches are applied.

  • Avoid running git clone with --recurse-submodules against untrusted repositories.

  • Consider not using the credential helper when cloning publicly available repositories.

The recent vulnerabilities in GitHub Desktop and related projects underscore the importance of robust security practices in software development. As the landscape of cybersecurity threats continues to evolve, developers must remain vigilant and proactive in addressing potential risks to protect sensitive user information.

Cybersecurity has never been more critical. At BetterWorld Technology, we empower businesses with advanced solutions to combat emerging threats while driving innovation. Protect your organization with confidence—contact us today to schedule a consultation and secure your company’s future.

Sources

  • GitHub Vulnerability Let Malicious Repos To Leaks Users Credentials, CybersecurityNews.

  • GitHub Desktop Vulnerability Risks Credential Leaks via Malicious Remote URLs, The Hacker News.

94 views
bottom of page