Git credential helper vulnerability announced

2 min read Original article ↗

Today, the Git project released new versions to address a security vulnerability in the credential helper mechanism that affects versions 2.26 and older.

These updates address an issue where a malformed remote URL (for example, from a git clone, either directly, or as part of a submodule) can inject arbitrary data into the credential helper protocol stream. If you use a credential helper[1], this can be used to exfiltrate your credentials for one repository to an arbitrary destination.

Upgrade to the latest Git version

The most effective way to protect against this vulnerability is to upgrade to 2.26.1. If you can’t update immediately, reduce your risk with the following:

  • Avoid running git clone with --recurse-submodules against untrusted repositories
  • Avoid using the credential helper by only cloning publicly available repositories

GitHub has also taken proactive action in order to protect against these attacks. Specifically, we:

  • Deployed a change to prevent malicious .gitmodules files from being pushed to GitHub.com
  • Scheduled a GitHub Desktop release for later today that prevents exploiting this vulnerability
  • Patched recent releases of GitHub Enterprise[2] to prevent this vulnerability in Pages

Credit for finding these vulnerabilities goes to Felix Wilhelm of Google Project Zero.

Download Git 2.26.1


[1]: Many Git users have credential helpers configured to use credentials from their operating system’s keychain.

[2]: These fixes were included in the supported release series, specifically: 2.17.21, 2.18.15, 2.19.10, and 2.20.4. A subsequent release next week will ship the same patches we use on GitHub.com to prevent malicious .gitmodules from being pushed to your installation.

Written by

Taylor Blau

Taylor Blau is a Principal Software Engineer at GitHub where he works on Git.

Related posts

This year’s most influential open source projects

From Appwrite to Zulip, Universe 2025’s Open Source Zone was stacked with standout projects showing just how far open source can go. Meet the maintainers—and if you want to join them in 2026, you can now apply for next year’s cohort.

Explore more from GitHub

Docs

Docs

Everything you need to master GitHub, all in one place.

Go to Docs

GitHub

GitHub

Build what’s next on GitHub, the place for anyone from anywhere to build anything.

Start building

Customer stories

Customer stories

Meet the companies and engineering teams that build with GitHub.

Learn more

The GitHub Podcast

The GitHub Podcast

Catch up on the GitHub podcast, a show dedicated to the topics, trends, stories and culture in and around the open source developer community on GitHub.

Listen now