Back to blog

A Read-Only MCP Tool Ran a Command: Test Effective Capability, Not Labels

3 min read
A Read-Only MCP Tool Ran a Command: Test Effective Capability, Not Labels

Sources checked: . FailSafe Research.

"Read-only" describes the intended Git operation, not the transitive behavior of the executable underneath it. The reference mcp-server-git implementation disclosed a high-severity vulnerability on 11 November 2026. A malicious repository could place a command-bearing value in its Git configuration, and an apparently read-only tool such as git_status would cause Git to run the attacker's program with the MCP server's privileges and environment, including available credentials. Version 2026.11.11 blocks the identified execution paths.

No working configuration or payload is published here. The lesson is about permission models, not about reproducing the issue. Confirm the current fixed version with the maintainers before relying on it.

Why the label failed

An agent runtime often decides what an agent may do based on a tool name, a description or a declared intent. The tool was read-only in the sense that it reported repository status. The call still spawned a subprocess, and that subprocess read repository-controlled configuration and could execute a program. The declared capability and the effective capability were different.

The environment made it worse. The subprocess inherited the server's environment, which may hold credentials for the repository host or another integrated service. A tool that was assumed to read public repository metadata could reach private authority.

Declared versus effective capability, and how to test each
SurfaceDeclared behaviorEffective capability to verify
Subprocess executionReads repository status.Whether the underlying command can spawn another program.
Repository configurationNot part of the tool's purpose.Whether repository-controlled settings change execution.
Environment inheritanceServer needs configured credentials.Which variables and tokens the child process receives.
Hooks and helpersNot exposed as tools.Whether pagers, signing commands or filesystem monitors can run.
Nested contentOne repository.Whether submodules or nested configuration extend reach.
Upgrade behaviorFixed version installed.Whether a later release changes the effective surface.

A safe test design

Use a disposable repository and a canary credential that is valid only inside the test environment. Place a benign marker program in the repository configuration. Call the read-only tool and observe whether the marker executes, which environment variables it receives and which network destinations it can reach. Then confirm that the fixed version does not execute the marker while the legitimate status call still works.

Record the result as three fields: what the tool declares, what it can effectively do, and the evidence for the gap. That last field is the useful part. A tool inventory that lists only names and descriptions is not a security inventory.

The wider MCP lesson

The same pattern applies beyond Git. Any tool that wraps a command-line program, a package manager, an infrastructure client or a document converter can inherit behavior from files, configuration or input the agent does not control. The agent's permission to call the tool is not the same as the authority the tool can exercise.

FailSafe's MCP security testing covers tool authorization, configuration-driven behavior and environment inheritance. The MCP server vetting checklist lists the provenance and evidence questions to ask before deployment, and the MCP assessment test plan describes a synthetic lab. The advisory requires interaction with an attacker-controlled or compromised repository, which is common for coding agents, but exploitation is not automatic in every deployment.

Questions & answers

Questions about this topic

Direct answers to common questions about this page.

The advisory describes the vulnerability and the fixed version. It does not establish widespread exploitation. Exploitation requires interaction with an attacker-controlled or compromised repository.

The read operation spawned the underlying Git executable, which read repository-controlled configuration. The declared tool behavior did not describe that transitive execution.

Declared capability, effective capability and the evidence for any gap, including subprocess behavior, environment inheritance and configuration-driven execution.

No. It closes the identified paths. Later releases and other tools can change the effective surface, so retest after upgrades.

Put this guidance to work

Bring the deployed servers, tools, configuration sources and credentials that shape what an agent can actually do.

Startup offer: $999 USD for 250 credits and one authorized black-box run. Sign in to SWARM before Stripe checkout. Custom scope and sovereign deployments are separate.

Scope MCP tool and server testing