Skip to content

[GHSA-6663-fm5v-gqm5] - mcp-server-git: Git LFS runs programs named in a repository's own configuration #5664

Done

Description

@cliffhall

Advisory: GHSA-6663-fm5v-gqm5

Server: mcp-server-git · Severity: high (verified) · Milestone: v2.6.0

Problem

The git server promises it never runs a program that a repository's own configuration names. When Git LFS is installed system- or user-wide (the Docker image does this), its trusted filter reads further settings from the repository's own .git/config (lfs.extension.*, lfs.customtransfer.*, lfs.standalonetransferagent) and runs the programs they name, and an LFS download runs the SSH command, credential helper and askpass program configured for an endpoint the repository chooses. Opening an untrusted repository and calling even a read-only tool such as git_status can therefore run arbitrary code as the server's user.

Fix

Empty those repository-scope Git LFS program settings the same way filter and merge drivers already are, and turn LFS downloads off (GIT_LFS_SKIP_SMUDGE=1). Checkouts and merges then write LFS files as pointer files; git lfs pull restores the content.

The fix is in the linked pull request. Reproduction details stay in the advisory until it is published.

Activity

  1. added
    bug
    server-git
    on Nov 27, 2026
  2. self-assigned this
    on Nov 27, 2026
  3. added this to the v2.6.0 milestone on Nov 27, 2026
  4. changed the title [-][GHSA-6663-fm5v-gqm5][/-] [+][GHSA-6663-fm5v-gqm5] - mcp-server-git: Git LFS runs programs named in a repository's own configuration[/+] on Nov 27, 2026
  5. cliffhall commented on Nov 27, 2026

    @cliffhall
    MemberAuthor

    Fixed by #5672.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugserver-gitv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions