Information ExposureWeakness · CWE-200

CVE-2024-50338

HIGH · 7.4 CVSS v3.1 Published 2025-01-14
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
81/100
Remediation priority · High
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Git Credential Manager (GCM) is a secure Git credential helper built on .NET that runs on Windows, macOS, and Linux. The Git credential protocol is text-based over standard input/output, and consists of a series of lines of key-value pairs in the format `key=value`. Git's documentation restricts the use of the NUL (`\0`) character and newlines to form part of the keys or values. When Git reads from standard input, it considers both LF and CRLF as newline characters for the credential protocol by virtue of calling `strbuf_getline` that calls to `strbuf_getdelim_strip_crlf`. Git also validates that a newline is not present in the value by checking for the presence of the line-feed character (LF, `\n`), and errors if this is the case. This captures both LF and CRLF-type newlines. Git Credential Manager uses the .NET standard library `StreamReader` class to read the standard input stream line-by-line and parse the `key=value` credential protocol format. The implementation of the `ReadLineAsync` method considers LF, CRLF, and CR as valid line endings. This is means that .NET considers a single CR as a valid newline character, whereas Git does not. This mismatch of newline treatment between Git and GCM means that an attacker can craft a malicious remote URL. When a user clones or otherwise interacts with a malicious repository that requires authentication, the attacker can capture credentials for another Git remote. The attack is also heightened when cloning from repositories with submodules when using the `--recursive` clone option as the user is not able to inspect the submodule remote URLs beforehand. This issue has been patched in version 2.6.1 and all users are advised to upgrade. Users unable to upgrade should only interact with trusted remote repositories, and not clone with `--recursive` to allow inspection of any submodule URLs before cloning those submodules.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Git Credential Manager (GCM) has a newline handling mismatch with Git. While Git rejects newlines (LF/CRLF) in credential values, .NET's StreamReader treats CR alone as a valid line ending. This allows attackers to craft malicious repository URLs containing CR characters that bypass Git's validation, enabling credential theft when users authenticate to the malicious remote.

MitigationUpgrade Git Credential Manager to version 2.6.1 or later. If upgrading is not immediately possible, avoid interacting with untrusted repositories and do not use --recursive clone until submodules can be inspected.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check Git Credential Manager version
    Run 'git credential-manager --version' or 'gcm --version' in the command line
    Affected if Version is below 2.6.1 (e.g., 2.6.0 or earlier)
  2. Verify GCM is the configured credential helper
    Run 'git config --get credential.helper' to see which credential helper is in use
    Affected if Output shows 'manager' or 'manager-core' (Git Credential Manager is active)
  3. Confirm .NET StreamReader behavior on your system
    This is inherent to the GCM version; no manual check needed - the vulnerability exists in .NET StreamReader's CR handling across affected GCM versions
    Affected if GCM version is vulnerable (below 2.6.1) and the credential helper is active

You are affected if Git Credential Manager version is below 2.6.1 AND it is configured as your active credential helper, allowing potential CR character injection from malicious repository URLs during authentication.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade Git Credential Manager to version 2.6.1 or later. If upgrading is not immediately possible, avoid interacting with untrusted repositories and do not use --recursive clone until submodules can be inspected.

Recommended fix High confidence

version 2.6.1 or later

  1. 1. Identify your current Git Credential Manager installation method (e.g., standalone installer, package manager, or bundled with Git)
  2. 2. For standalone installations, download Git Credential Manager version 2.6.1 or later from the official GitHub releases page
  3. 3. For package manager installations (e.g., Homebrew, winget, Chocolatey), update the package to the latest version containing the fix
  4. 4. If using Git for Windows which bundles GCM, update Git for Windows to a version that includes GCM 2.6.1 or later
  5. 5. Verify the upgrade was successful by running 'git credential fill' and confirming the version or checking that the application starts without errors

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation1.0 h
  • Implementation1.0 h
  • Testing3.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,010
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,616.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-50338 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-50338 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data