Case · DiggingBeagle record

The reference Git MCP tool could echo a configured remote credential embedded outside URL userinfo

The git_remote tool promised to hide credentials returned from a repository remote, but its earlier redaction routine primarily masked user:password before the host. A token in a query parameter, URL fragment or path could still appear in serialized tool output.

Public disclosure: Nov 11, 2026

Scope

An agent inspects a Git repository whose remote URL contains a secret outside the typical URL username/password segment.

UnratedAI role: AGAINST AIAssessment method

At a glance

Mechanism and trust boundary

  1. 01

    Starting condition

    An agent inspects a Git repository whose remote URL contains a secret outside the typical URL username/password segment.

    Boundary: precondition and attacker capability

  2. 02

    Trust boundary crossed or evaluated

    PR 5533 added query and fragment redaction and corrected a malformed-userinfo edge case; path-embedded tokens remained difficult to classify safely without changing unrelated paths. A merged source fix does not prove every deployed MCP package version has been updated.

    Boundary: mechanism

  3. 03

    Observed consequence

    The MCP tool can return the secret to model context, logs or downstream consumers even while ordinary userinfo masking appears correct.

    Boundary: observed effect and limitations

Claims & evidence

CLM-NOV15-MCPGIT-MECHThe git_remote tool promised to hide credentials returned from a repository remote, but its earlier redaction routine primarily masked user:password before the host. A token in a query parameter, URL fragment or path could still appear in serialized tool output. PR 5533 added query and fragment redaction and corrected a malformed-userinfo edge case; path-embedded tokens remained difficult to classify safely without changing unrelated paths. A merged source fix does not prove every deployed MCP package version has been updated.supported

Basis: reported finding

Link to claim
CLM-NOV15-MCPGIT-SCOPEThe attacker would need access to a repository configured with a credential-bearing remote and a channel that reads or exports the tool result. The report does not document actual credential misuse or an automatically attacker-controlled remote URL. The evidence is bounded by the cited source and test setting. Broader incidence, other environments, and actual production consequences are not established merely by these observations.supported

Basis: reported finding

Link to claim

Implications

The MCP tool can return the secret to model context, logs or downstream consumers even while ordinary userinfo masking appears correct.

Controls and mitigations

  • Prefer credential helpers over tokens embedded in remotes and scrub remotes before passing them to an agent.
  • Regression-test query, fragment, helper and path forms; verify the first packaged fixed release rather than assuming a merged pull request updates installations.

Unknowns and contradictions

  • The evidence is bounded by the cited source and test setting. Broader incidence, other environments, and actual production consequences are not established merely by these observations.

Sources and citation

Material revision history

  1. Nov 15, 2026 · Canonical change recorded · new in release · revision 250