Skip to main content
[← back to blog]

The MCP security checklist, rewritten for agents that edit their own config

The worst MCP flaws of 2026 never needed a poisoned tool description. Seven checks a platform team can run before connecting a server, each with the reason it exists.

Apr 30, 20268 min readUpdated Oct 31, 2026

On 11 February 2026, Intezer opened a HackerOne ticket against Kiro, AWS's agentic IDE. The write-up by its researcher Nicole Fishbein, published on 20 July, describes an attack that needed no exploit in the usual sense, only a web page carrying a few lines of text a person could not see.

A developer asked Kiro to fetch the page and approved the fetch. Kiro read the hidden lines as instructions, wrote a new server into its own MCP configuration file, ~/.kiro/settings/mcp.json, and reloaded it. The server's start command was the attacker's code, running with the developer's privileges.

Kiro sometimes showed a pop-up saying the configuration had changed. Intezer found that "the configuration is reloaded regardless of the user's response." Its diagnosis is the sentence to keep: "The agent can therefore edit its own trust boundary."

Kiro, as Intezer reported it
What the developer saw
  • A request to fetch a URL, approved
  • A helpful summary of the page
  • A note that Kiro wrote a file
  • Nothing, or a pop-up that changed nothing
What happened
  • Kiro parsed instructions hidden in the page
  • Kiro wrote ~/.kiro/settings/mcp.json without asking
  • The config reloaded and started the attacker's server
  • Hostname, username and platform left every 10 seconds

AWS's disclosure team took the ticket on 6 March and said on 3 April that a fix had shipped; Intezer confirmed version 0.11.130 was patched. The bug is tracked as CVE-2026-10591, whose bulletin covers Kiro's file tool writing to "execution-sensitive paths" before version 0.11 and credits Cymulate: one CVE, more than one team's report.

What the MCP security checklist has to cover in 2026

The first version of this checklist, published in April, was built around tool poisoning: a tool description that tells the model to do something the user never asked for. That attack is still real. None of the four incidents below needed it.

Four MCP incidents of 2026
  1. Jan 20
    mcp-server-git
    Cyata: three flaws in Anthropic's reference Git server, code execution when paired with the Filesystem server
  2. Mar 10
    Azure MCP Server, CVE-2026-26118
    A URL where a resource ID belonged; the server could send its managed identity token to it
  3. Apr 15
    Windsurf, CVE-2026-30615
    Attacker-controlled HTML registered a malicious MCP server with no further user interaction
  4. Jul 20
    Kiro, CVE-2026-10591
    Hidden page text made the agent rewrite its own mcp.json and start a server

In January, Cyata disclosed three flaws in mcp-server-git, the official Git server Anthropic maintains as a reference implementation. The bugs (CVE-2025-68143, CVE-2025-68144, CVE-2025-68145) were missing checks on paths and arguments, and GitHub's advisories rate each one medium. Paired with the Filesystem server, which writes files, they added up to code execution, set off by text the agent happened to read.

Each MCP server might look safe in isolation, but combine two of them, Git and Filesystem in this case, and you get a toxic combination.

Yarden Porat, Cyata, to The Register, January 2026

Cyata first reported the flaws to Anthropic in June 2025 (The Register). Anthropic removed the git_init tool entirely in September and fixed the other two in version 2025.12.18.

In March, Microsoft published CVE-2026-26118 for Azure MCP Server, rated Important at CVSS 8.8. Someone who can talk to the agent submits "a malicious URL in place of a normal Azure resource identifier," and the server's request to it "may include its managed identity token." The attacker gets that identity's permissions and, in Microsoft's words, no "broader tenant-level or administrator permissions."

In April, OX Security published CVE-2026-30615 against Windsurf 1.9544.26: attacker-controlled HTML could get the editor to change its MCP configuration and register a malicious server, "resulting in execution of arbitrary commands without further user interaction." OX said other coding assistants could be steered the same way, but only Windsurf got a CVE, because only there did it need no user interaction.

In the researchers' own reports
  1. IntezerJul 20, 2026
    Report
    When the AI Edits Its Own Trust Boundary, Remote Code Execution Vulnerability in AWS's Agentic IDE

    “The agent can therefore edit its own trust boundary.”

    Read the source
  2. CyataJan 20, 2026
    Disclosure
    Cyata Research: Breaking Anthropic's Official MCP Server

    “These vulnerabilities affect Anthropic's official MCP server, the reference implementation maintained by the creators of MCP themselves.”

    Read the source
  3. OX SecurityApr 15, 2026
    Advisory
    MCP Supply Chain Advisory: RCE Vulnerabilities Across the AI Ecosystem

    “A prompt injection vulnerability in Windsurf allows remote attackers to execute arbitrary commands on a victim system.”

    Read the source

So a checklist has more to inspect than the tool list. The config file decides what runs, and twice this year the agent rewrote it. Servers also have to be judged as a set and by the credentials they hold, as January and March showed.

What changed in MCP itself this year

The MCP specification itself tightened in 2026. Its current revision, 2026-07-28, makes MCP stateless, and the tool list a server returns "MUST NOT vary per-connection" and should come back in a deterministic order. For the same version and credentials, a saved copy is therefore a fair baseline, and a diff against it means something changed.

Authorization tightened too. Clients must now check a returned iss against the issuer they recorded before redeeming a code, and client credentials are bound to the authorization server that issued them. Dynamic Client Registration is deprecated in favour of Client ID Metadata Documents. Ask each vendor which revision its client implements, since a client on 2025-11-25 is not bound by the iss check.

The official MCP Registry is still in preview. It verifies that a publisher controls the GitHub account or domain a server is named after and relies "on the broader ecosystem for security scanning of actual server code." A listing tells you who published a server, and nothing about what its code does.

On the client side, the control that counts is a managed allowlist. Claude Code and GitHub Copilot both read allowedMcpServers and deniedMcpServers from managed settings, matching a server by its exact command or URL (Anthropic, GitHub). GitHub is candid about the alternative, restricting clients to a private registry: "Less secure matching, based on name or ID only. Users can bypass the restriction by editing configuration files" (GitHub).

Before you install the server

Check the source, then pin the version

A package name, like a registry listing, tells you who published something. Ask where its source lives and read it, then check the signatures on what you installed.

npm view @modelcontextprotocol/server-filesystem repository.url
# git+https://github.com/modelcontextprotocol/servers.git
npm audit signatures

npm audit signatures verifies the registry's signatures on installed packages and, for packages that publish them, their provenance attestations. A week-old repository with three commits is its own answer.

Then pin the exact version. npx -y some-server with no version runs whatever the registry serves that day, which is a rug pull you scheduled yourself.

.mcp.json (project root)
{
"mcpServers": {
  "filesystem": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-filesystem@2.1.0", "."]
  }
}
}

2.1.0 was the latest release on 31 October 2026, after the project jumped from date-based versions such as 2026.8.31 to 1.0.0 in October: exactly the bump that deserves a person reading the diff.

Patch the servers, and review them as a set

Being the reference implementation did not make mcp-server-git safe. Upgrade it to 2025.12.18 or later, and track every server's security advisories as you would any dependency's.

Then look at the servers an agent holds together. A server that writes files and one that runs git were each reasonable, and the pair was code execution. For every pair, ask what one server's output lets the other do, as you would for two roles attached to one identity.

Before the agent gets the server

Read what the model reads, and keep a copy

The model reads every tool and parameter description, and almost nobody else does. The specification still says clients "MUST consider tool annotations to be untrusted unless they come from trusted servers." The MCP Inspector CLI takes your real config file: dump every description at every depth with hidden characters made visible, and save the list as the baseline.

npx @modelcontextprotocol/inspector --cli --config .mcp.json --server filesystem \
  --method tools/list --format json > tools.lock.json
jq -r '.. | .description? // empty' tools.lock.json | LC_ALL=C cat -v

# before the agent uses an updated server
npx @modelcontextprotocol/inspector --cli --config .mcp.json --server filesystem \
  --method tools/list --format json > tools.now.json
diff <(jq -S '.result.tools' tools.lock.json) <(jq -S '.result.tools' tools.now.json)

Listing tools starts the server, so do this inside the sandbox described below. An empty diff proves only that nothing changed since the review, which is why the slow read comes first. Snyk Agent Scan (uvx snyk-agent-scan@latest) gives a second opinion; it asks before contacting each server, and it sends tool descriptions to Snyk's API.

Give each server its own small identity

The Azure flaw gave an attacker exactly what the server's managed identity could reach, which is the case for keeping that reach small. Give every server a credential of its own, scoped to the one resource it serves, and catch the developer's personal token pasted into an env block in review.

A local server also runs as the developer, and the specification's security guidance tells clients to "warn that MCP servers run with the same privileges as the client." Unless the client sandboxes it, the server can read whatever the developer's account can, key files and cloud credentials included. Check what environment your client passes to the servers it starts. A setup guide that asks for admin rights for convenience is a finding.

Put the config file out of the agent's reach

Windsurf and Kiro failed the same way: the agent could write the file that decides what runs, and the client acted on the change. Review MCP config changes in pull requests like CI workflows, since both are commands another machine will run, and turn off wholesale approval. In Claude Code, enableAllProjectMcpServers approves "every server in project .mcp.json files without a prompt."

The structural fix is an allowlist matched on the exact command or URL, delivered through managed settings the agent cannot edit. A server the agent writes into its own config then matches nothing and does not start. An entry names a command and its arguments, so keep reviewing the env block that travels with it.

managed-settings.json
{
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
  { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem@2.1.0", "."] },
  { "serverUrl": "https://mcp.example.com/*" }
],
"deniedMcpServers": [
  { "serverCommand": ["npx", "-y", "retired-mcp-server"] }
]
}

Match on serverCommand or serverUrl. Anthropic warns that a serverName entry "is not a security control," because a user can call any server github, and allowManagedMcpServersOnly is the Claude Code switch that stops users widening the list. GitHub's client reads a malformed policy as an empty allowlist and keeps its last policy when it cannot fetch a new one, so the policy "can become more restrictive, but not less restrictive." That is the right way for a control to fail.

Once it is running

Run it offline first, then watch it

The specification tells clients to "execute MCP server commands in a sandboxed environment with minimal default privileges," so start there. Install the pinned server and the Inspector into a folder with the network on, then do the first run and the reading in a container with none.

docker run --rm -it --network=none -v "$PWD/mcp:/srv" -w /srv node:22-slim sh

A file server that breaks without a network had no business needing one. Next, run it on a watched machine and read what the process did: an address you do not recognise is the answer, and so is a child process nobody expected.

sudo lsof -a -p <server-pid> -i -n -P   # every socket the process holds
The Kiro chain, as the operating system would record it
  1. 01
    Fetch
    The IDE fetches a page the developer approved.
  2. 02flagged
    Write
    The IDE process writes its own MCP config file.
  3. 03flagged
    Spawn
    The IDE starts node with an inline script nobody reviewed.
  4. 04flagged
    Connect
    The new process calls out every 10 seconds.

Keep a record off the machine, and an off switch

The specification asks clients to "log tool usage for audit purposes." A log in a file the agent can write is a diary, so ship it off the machine the agent runs on. Keep the denylist ready as well: when a server you allowed goes bad, one deniedMcpServers entry in managed settings stops it on every machine that receives the file.

Start with one developer machine

Pick one developer machine and list every MCP config on it and every command those configs start; the gap between that list and the approved one is your first finding. This week, move mcp-server-git to 2025.12.18 or later and Kiro to 0.11 or later, and remove any setting that approves project servers wholesale. This month, ship a managed allowlist matched on commands and URLs, with the denylist beside it.

Allowlists decide what may start. Everything after that, a permitted server misbehaving included, is a question for the operating system. Kiro's chain would have read there as an IDE writing its own MCP config, then starting a process that called an unknown host every ten seconds: routine one event at a time, unmistakable as a sequence.

Quint records that activity at the operating system of each developer machine, next to the tool calls the agent declared, and scores the sequence on the device with no LLM in the decision path. To see a tool call beside what the operating system recorded, book a demo.

Related reading

Your agents are running. See what they're actually doing.

Book a demo