Security Engineer Discovers Multiple Git Vulnerabilities: Risks & Fixes
by gauravsinghigcTags : Git security flaws, software vulnerabilities, cybersecurity | Published at : 10 Feb 2025 12:43 PM | Author : Gaurav Singh (gauravsinghigc)
A security engineer has identified critical Git vulnerabilities, highlighting the need for stronger repository protection and cybersecurity practices.
KNOW MORECritical Git Vulnerabilities Exposed: Millions of Developers at Risk
A security engineer has uncovered multiple vulnerabilities in Git tools that exposed developers to credential theft. These flaws affected popular tools such as GitHub Desktop, Git Credential Manager, Git LFS, GitHub CLI, and GitHub Codespaces, all stemming from improper input validation.
RyotaK, a security researcher at GMO Flatt Security Inc., discovered these vulnerabilities in October 2024 while participating in the GitHub Bug Bounty program. The findings highlight how improper handling of text-based protocols can introduce major security risks.
🔍 Understanding the Git Credential Protocol Vulnerabilities
These security flaws revolve around the Git Credential Protocol, which exchanges user credentials in a key-value format using newline delimiters (\n
).
While Git generally blocks newlines and NULL bytes to prevent injection attacks, the improper handling of carriage return characters (\r
) created security loopholes. These vulnerabilities affected multiple Git tools:
📌 GitHub Desktop (CVE-2025-23040)
- A malicious submodule URL containing
%0d
(a hexadecimal carriage return) could bypass GitHub Desktop’s parsing logic. - This tricked the tool into exposing user credentials for github.com to attacker-controlled domains.
📌 Git Credential Manager (CVE-2024-50338)
- Parsing flaws in .NET’s StreamReader allowed carriage return characters to bypass security mechanisms.
- This made users vulnerable to credential theft through improperly processed authentication data.
📌 Git LFS (CVE-2024-53263)
- Newline injection vulnerabilities enabled malicious repositories to manipulate configuration files.
- Attackers could bypass Git safeguards and steal sensitive credentials.
📌 GitHub CLI (CVE-2024-53858)
- Logic flaws caused GitHub CLI to leak access tokens to attacker-controlled domains.
- Exploits leveraged certain environment variables like
CODESPACES=true
andGITHUB_ENTERPRISE_TOKEN
.
📌 GitHub Codespaces
- The gitcredential_github.sh script in Codespaces indiscriminately returned sensitive tokens for all Git operations.
- This resulted in unauthorized access to private repositories and authentication tokens.
🛡️ How Git Responded to These Threats
In response to these vulnerabilities, Git implemented a comprehensive defense mechanism: credential.protectProtocol (CVE-2024-52006).
🔹 Key Security Fixes:
- 🚨 Git now blocks URLs containing carriage return characters (
\r
). - 🔍 GitHub updated Codespaces to validate host requests before sharing credentials.
- 🔑 Git LFS enhancements now prevent configuration modifications by malicious repositories.
📌 Lessons for Developers & Security Teams
RyotaK’s findings serve as a stark reminder of the dangers posed by text-based protocols and inadequate validation. As the researcher noted:
“A small architecture flaw can lead to a big security issue.”
To mitigate risks, developers and platform maintainers should adopt a defense-in-depth strategy that includes:
- ✔️ Implementing strict input validation to prevent injection attacks.
- ✔️ Conducting regular security audits on authentication mechanisms.
- ✔️ Applying security patches and updates immediately.
📝 Final Thoughts
The exposure of these Git vulnerabilities underscores the ongoing challenges in securing developer tools. By strengthening security practices and remaining vigilant, the developer community can better protect against emerging threats and safeguard critical credentials.
Share details @
Browse More Blogs
-
PPF For Regular Income: How to Get Rs 60,000/Month Tax-Free Income from Public Provident Fund?
-
5 Best Fitness Trackers of 2025: Top Picks for Health Enthusiasts in India
-
India's First Hydrogen Train to Launch on Jind-Sonipat Route by March 31
-
What Is ‘Geido’? This 700-Year-Old Japanese Philosophy Can Help You Master Any Skill in Your Career
-
'This is No 2008-Style Crash': Helios Capital's Samir Arora Explains Why This Bear Market Is Different
-
Internet Struggles to Spot the Hidden Cat in This Optical Illusion – Can You Do It in 30 Seconds?
-
Mega Smartwatch Days: Grab up to 80% Off on Top Smartwatches at Amazon
-
UFC 313: Two Massive Last-Minute Fight Cancellations Shake Up Event
-
Scotland Call Up Trio as Crosbie and Mann Drop Out Ahead of Six Nations Clash
-
Not Just iPhones: Apple’s $500B Push for AI & Semiconductor Strength
-
AIKA 365: Transforming SharePoint into Next-Gen AI-Driven Search Engine for Digital Workplace
-
OnePlus Red Rush Days Sale: Massive Discounts on OnePlus 13, Nord 4, and More
-
Microsoft Copilot Application is Now Available on Mac: All You Need to Know
-
HMD Expands Feature Phone Lineup with Four New Models at MWC 2025
-
Another Joe Rogan Podcast Goes Viral, This Time with Elon Musk – Here's What the World's Richest Man Said
-
PM Modi's Next Big Move: A Pension Card for Every Indian?
-
Rohit Sharma vs Travis Head: Who Has the Better Record After 72 ODIs?
-
Elon Musk Publicly Supports US Withdrawal from UN and NATO
-
Stock Market Scam: What Are the Charges Against Ex-SEBI Head Madhabi Puri Buch?
-
Xiaomi 15 Ultra to Debut in India Soon: Launch Date, Expected Specifications, and More
-
'You Are Better Off...': Zerodha's Nithin Kamath Shares SIP Tips Amid Market Blues
-
Nothing Phone 3a, 3a Pro to Launch Tomorrow: Everything You Must Know About the Upcoming Phones
-
iPhone 17 Air May Ditch These 3 Features for Ultra-Thin Design: Here's What to Expect from Apple in September
-
Samsung Expanding OneUI 7 Update to More Phones: Is Yours on the List?
-
ISRO to Resume SpaDeX Mission from March 15: All You Need to Know
-
UK Launches Investigation into TikTok, Reddit Over Children's Personal Data Practices
-
Valkyrae, Cinna, and Emiru Threatened by Stalker During Livestream
-
How AI & Animation Are Powering Tom Gates’ Expansion in India
-
Sunita Williams' Salary and Net Worth: How Much Does the Veteran NASA Astronaut Earn? Check Details
-
How to Keep ‘Digital Natives' Rooted to Reality