DEV Community

Cover image for A read-only git_status ran attacker code. The coding agent toolchain is the new trust boundary
Sofia_ Humanbound for Humanbound

Posted on

A read-only git_status ran attacker code. The coding agent toolchain is the new trust boundary

Humanbound's engine and CLI are open source: github.com/humanbound/humanbound*

Anthropic's reference Git MCP server was patched on 18 November for eight advisories, then patched again on 27 November because a Git LFS route still let a plain git_status call run attacker programs. Around it, coding agent approval files are leaking live credentials to GitHub, and the MCP and Agent Skills supply chain is attacked through instructions more than code. Regulators, led by the HKMA, now want every agent's tools, privileges and stop mechanism on record.

Two patches, nine days, one root cause

mcp-server-git is the reference Git server in the Model Context Protocol servers project, the one many teams copy when they wire an agent to a repo.

On 18 November, release v2.5.0 shipped eight advisories, five rated high. The common root cause: a repository's own Git configuration could make the server launch a program with the user's rights. Several of the affected tools were the "read-only" ones. git_show, git_diff, git_status and git_log could trigger a lazy fetch. An empty-named filter driver ran on git_status. A merge could fire a maintenance hook. Five of the eight reports noted that AI tools helped find or write them up.

On 27 November, release v2.6.0 closed a bypass. The first fix stripped dangerous drivers from the repo's .git/config but still trusted drivers from global or system config, Git LFS included. LFS then read its own options from the repo config, and several of those options are program paths: clean and smudge commands, custom transfer agents, core.sshCommand, credential.helper, core.askpass.

The result, tracked as GHSA-6663-fm5v-gqm5 (High, 7.8): the clean command runs on a plain git_status call, with no network access and no LFS object needed. The tool then reports an unchanged working tree.

Who is exposed

The attacker needs control of the .git folder itself, through an unpacked archive, a shared folder or a vendored tree. A normal clone does not carry these settings. The trigger is git lfs install in global or system config, and the server's own Dockerfile installs git-lfs system-wide. The mcp/git image on Docker Hub was last updated in June 2025, before both fixes.

# PyPI
pip install -U "mcp-server-git>=2026.11.27" "mcp-server-fetch>=2026.11.27"
# npm: server-memory 2.2.2, server-filesystem 2.4.1 (Windows)
# Docker: rebuild from current source, do not pull mcp/git
Enter fullscreen mode Exit fullscreen mode

Pinned date-version installs will not update on their own, so check your lockfiles.

The broader lesson: "read-only" describes what a tool intends. The host environment, meaning global config, installed helpers and the container image, decides what a call can actually execute. And a boundary fix needs to be retested, because the second patch exists only because someone pushed on the first.

The approvals your agent collects are leaking

When you approve a shell command in Claude Code with "Yes, and don't ask again", the command is stored in .claude/settings.local.json, inline secrets included. The global gitignore entry does not help once a folder becomes a repo, gets cloned elsewhere, or the file was already committed. Apiiro surfaced the issue, and GitGuardian counted 31,088 distinct secrets in these files on public GitHub, 5,343 still valid at detection.

GitGuardian also pointed to Stony Brook University research presented at ACM CCS: planted AWS keys in public container images saw their first use after about 7.86 seconds, with a median of about 51 seconds.

git rm --cached .claude/settings.local.json
echo ".claude/settings.local.json" >> .gitignore
git log --all -- .claude/settings.local.json   # history still has it
# rotate every credential that file has ever contained
Enter fullscreen mode Exit fullscreen mode

The supply chain now speaks in instructions

OX Security's "Plug and Pray" research (23 November) analysed 542,207 components across npm, PyPI, MCP servers and Agent Skills. Among flagged MCP servers, prompt injection and tool poisoning (22%) were more common than install-time code execution (16%). Among 179 flagged Agent Skills, none executed code at install, yet 44% told the agent to send data out. And 83% of 834 flagged MCP servers could not be independently verified.

Put that next to mcp-server-git. One attack path asks the agent to misbehave in plain language. The other hides inside a tool the agent was told is safe to call. Both end with the agent's own permissions doing the work.

Regulators are asking for an agent inventory

The Hong Kong Monetary Authority's discussion paper on agentic AI governance (published 2 November, analysed by CSA on 28 November) proposes that banks record every in-scope agent before production: owners, tools including MCP servers, privileges, stop mechanism and log locations. Proposed reportable incidents include:

  • an agent acting beyond its authority
  • a stop mechanism that fails
  • a compromised agent credential
  • an approval gate that lets an action through improperly

Comments are due 1 February 2027. Whether or not you bank in Hong Kong, that list is a sound test plan for any agent with real reach.

What to do with this

Inventory the tools your agents can call and check what each one can execute in your real environment, not the one in the README. Keep secrets out of approved commands. Treat tool descriptions and skills as untrusted input. Then test the boundary the way an attacker would, and test it again after every fix.

Find out what your agent does under pressure. Humanbound's free Community plan runs hosted attack models against your agent, or against the FinAssist demo agent if you want to see it first. Sign up free at app.humanbound.ai

References

Top comments (1)

Collapse
 
kate8382 profile image
Ecaterina Sevciuc •

Great breakdown—especially the part about how "read-only" means nothing once the host environment gets involved, and how 44% of flagged Agent Skills didn't even need malicious install code because the payload was pure language. For an LLM, text and intent are executable code, yet most defenses still look only for bad scripts.

And honestly, regulatory checklists like HKMA’s agent registries feel like paper crutches rather than real security. Writing down owners, privileges, and stop mechanisms in a compliance doc won't stop a prompt injection or a misconfigured tool boundary at runtime—it just creates an illusion of control while real engineering enforcement lags behind. (I actually wrote a deep dive on why paper-based AI regulation and compliance checklists fail against real agent threats here if you're interested: The AI Security Paradox: Why Old Laws Create Digital Enclosures).

Appreciate you pulling all these November advisories into one clear timeline!