Writing / What I’m building

Too much authority, checked too late

568 MCP vulnerabilities in four months, 20 of them in AWS's own servers. What they have in common, how many come down to authority, and the open-source library I built for it.

By Manideep Pendyala · November 14, 2026 · 10 min read

Since July, AWS has published 19 security bulletins for its own MCP software. That’s nineteen in four months, for the servers that let AI assistants work with HealthLake, Amazon MQ, DocumentDB, Postgres, MySQL, the AWS API itself, and the registry meant to manage all of them.

AWS isn’t careless, and it isn’t alone. Between July 1 and November 13, 2026, 568 published vulnerabilities mentioned MCP. That’s more than four a day.

I went through them. A lot of them come down to the same thing: an agent, or whoever was talking to it, ended up with more authority than it was supposed to have. The check that should have stopped it was missing, in the wrong place, or easy to talk around.

That’s the problem I built Ratchet for. This post covers what’s been happening, what the failures have in common, and how Ratchet works.

What happened at AWS

Here are six of the nineteen, as AWS describes them:

  • Jul 23, AWS API MCP Server. If the server’s security policy failed to load at startup, the server kept running with the policy check skipped. Operations the operator had denied would simply run. (2026-063-AWS)
  • Aug 3, Amazon MQ MCP Server. Broker credentials and OAuth tokens could be sent to an endpoint of an attacker’s choosing, through a hostname slipped into the model’s context. (2026-070-AWS)
  • Aug 5, DocumentDB MCP Server. Read-only mode missed two aggregation stages, $out and $merge, which write. (2026-076-AWS)
  • Oct 27, AWS API MCP Server. The server checked a token’s signature, issuer and expiry, but not which application it was issued for. A token for another app in the same tenant was accepted, and AWS calls ran with the server’s own credentials. (2026-152-AWS)
  • Nov 10, AWS API MCP Server again. Operation names with consecutive capital letters were normalized wrongly, so they never matched the operator’s deny list. Denied operations ran. (2026-176-AWS)
  • Nov 11, mcp-gateway-registry. The management API checked who you were, not what you were allowed to do. A low-privileged user could map their own group to registry administrator. (2026-179-AWS)

Over the same months, AWS’s Strands Agents tools got six bulletins with a pattern of their own: a security setting exposed as a tool parameter that the model itself could set. The shell tool’s consent prompt was skipped if the model set non_interactive to true (2026-072-AWS). The environment tool’s secret masking could be switched off the same way (2026-154-AWS). The memory tools used a namespace the model chose as the only thing keeping tenants apart (2026-077-AWS).

It’s not just AWS

From the same four months:

  • Google’s MCP Toolbox accepted any valid Google OAuth token, even one minted for an unrelated app, when no audience was configured (CVE-2026-14541). In a separate bug, unauthenticated callers could reach tools that required a scope through legacy HTTP endpoints (CVE-2026-14537).
  • The official MCP TypeScript SDK could accept a valid access token issued for a different service, because it didn’t enforce the token’s audience (CVE-2026-111771).
  • Microsoft’s MCP Gateway had an authorization bypass through a user-controlled key that let an authorized user raise their own privileges (CVE-2026-109492).
  • IBM’s ContextForge MCP Gateway let a request header override the gateway’s own upstream credential, getting around per-user permissions (CVE-2026-110279). Its identity-propagation signatures could also be replayed (CVE-2026-110278).
  • LiteLLM’s MCP endpoint let an unauthenticated attacker reach MCP tools with a made-up Authorization header (CVE-2026-59822). CISA added it to its Known Exploited Vulnerabilities catalog on September 2.
  • HashiCorp’s terraform-mcp-server ran tool calls with another user’s Terraform credentials for anyone who had that user’s session ID (CVE-2026-16496).
  • Zscaler’s MCP server issued confirmation tokens that weren’t tied to the resource they were for, so one could be replayed against another (CVE-2026-59563).
  • GitLab let an MCP-scoped token do things beyond its scope (CVE-2026-92874).
  • n8n’s AI Agents ignored the allowed-domains restriction on credentials, so a user with use-only access could send a shared secret to a server they controlled (CVE-2026-59207).
  • Dynatrace’s MCP server, started in HTTP mode, ran tool calls from anyone who could reach it, under the server’s own credentials (CVE-2026-123811).
  • JetBrains PyCharm allowed code execution through Jupyter MCP tools that required no authentication (CVE-2026-75060).
  • Next.js’s dev server exposed an MCP endpoint that a malicious website could reach, reading source snippets and dev logs (CVE-2026-94485).

How many of these is Ratchet built for?

I went through all 167 vulnerabilities from the 31 companies in the chart below, one at a time, and put each into one of three groups:

  • Ratchet’s checks cover it. What failed is a check Ratchet makes on every call: is this caller allowed this tool, with these arguments, on this resource? Was the token issued for this service, and is it held by the workload it was issued to? Does the check fail closed?
  • Ratchet narrows it. The bug lives inside a call Ratchet would allow, like a server-side request forgery or a path traversal in a permitted tool. A token’s restrictions can still pin which hosts, paths and tools that call can reach.
  • Outside what Ratchet does. Command and SQL injection, code execution, denial of service, memory bugs, secrets in logs. These have to be fixed in the tool itself.
MCP vulnerabilities published July 1 to November 13, 2026, by company. Hover a bar for its split.

Of the 167, 68 fall in the first group, 35 in the second and 64 outside. Across all 568, most of them in smaller open-source projects, the split is similar: 236, 157 and 175 (the other 401 were sorted by a rougher pass, by weakness type).

So roughly four in ten are exactly the kind of failure Ratchet exists to stop, a quarter or so are ones it would contain, and the rest it doesn’t touch. I’d rather say that plainly than pretend one library fixes MCP security.

What they have in common

Reading them one after another, four failures keep coming back.

  1. The check lives in the wrong place. Read-only modes, consent prompts and secret masking were built inside the tool, and sometimes switched by a parameter the model could set. If the model can be talked into something, so can the check.
  2. Tokens that work anywhere. Tokens accepted without checking who they were issued for (AWS on Oct 27, Google, the MCP SDK), or replayable by anyone holding them (HashiCorp’s session IDs, Zscaler’s confirmation tokens, ContextForge’s signatures).
  3. Checks that fail open. A policy that’s skipped when it fails to load. A deny list that a differently spelled operation name slips past.
  4. Authority that grows. A user mapping themselves to admin. A header replacing the gateway’s credential. A scoped token acting outside its scope.

So I built Ratchet

Ratchet is an open-source authorization layer for AI agents. It sits between an agent and the tools or sub-agents it calls, and it holds one rule: an agent can never act with more authority than it was explicitly given, even if its model has been completely taken over by a prompt injection.

It’s my implementation of the architecture in Delegation Without Trust by Dantuluri and Sundi. Their paper designs and evaluates it, but their own implementation wasn’t released, so I built one. Ratchet is independent of the authors.

Tokens that can only narrow

Every agent gets a capability token. The token carries its permissions as a list of restrictions, called caveats:

Caveat What it limits
tool_name Which tools can be called. A pattern that has to match the whole name.
arg_constraint What an argument has to be: an exact value or a pattern.
resource Which resource the token is for, such as one MCP server’s URL.
expires_at When the token stops working.
max_depth How many more times it can be handed on.
bound_to Which workload holds it.

The token’s signature is a chain of HMACs, one link per caveat, like a macaroon. Only the broker can add a link, and taking a caveat out breaks the chain. So restrictions can be added and never removed, and authority only turns one way. That’s where the name comes from.

Tokens tied to whoever holds them

Every agent has its own Ed25519 key pair, and each token is bound to the fingerprint of the agent it was issued to. When a token is presented, the broker checks that the presenter is that agent. A token copied out of a log, a prompt or another agent’s memory is no use to anyone else.

Three calls

The broker does three things:

  • issue(): a person grants an agent a root token, with the caveats they choose.
  • exchange(): when an agent hands work to a sub-agent, it trades its token for a new one. The new token is re-bound to the sub-agent, can’t outlive its parent, and can only be narrower. Ratchet rejects any change that could widen it.
  • authorize(): runs before every tool call. It checks the signature, revocation, holder and expiry, then every caveat against the actual tool name, arguments and resource. It’s a plain function call in the same process, with no model and no network in the way, so the model never gets a say. Any error counts as a denial. Every decision, allowed or denied, goes into a hash-chained audit log, and revoking a token revokes everything delegated from it.

Here’s what that looks like:

●●●[ python ]
from ratchet_core import (
    Broker,
    Ed25519WorkloadIdentity,
    ProposedToolCall,
    arg_constraint_caveat,
    tool_name_caveat,
)

broker = Broker()
planner = Ed25519WorkloadIdentity("planner")
analyst = Ed25519WorkloadIdentity("analyst")

# A person gives the planner two tools.
root = broker.issue(
    human_identity="mani@example.com",
    primary_identity=planner,
    caveats=[tool_name_caveat("run_query|send_report")],
)

# The planner hands the analyst one tool, on one database, for five minutes.
token = broker.exchange(
    parent_token=root,
    delegator_identity=planner,
    delegatee_identity=analyst,
    new_caveats=[
        tool_name_caveat("run_query"),
        arg_constraint_caveat("database", equals="analytics"),
    ],
    ttl_seconds=300,
)

decision = broker.authorize(
    token,
    presenting_identity=analyst,
    proposed_tool_call=ProposedToolCall("run_query", {"database": "billing", "sql": "select 1"}),
)
print(decision.allowed, decision.reason_code)  # False CAVEAT_NOT_SATISFIED

The analyst can run queries on analytics and nothing else. Asking for billing is denied, so is calling send_report, and if the planner tries to use the analyst’s token, that’s denied too (NOT_BOUND).

It plugs into the frameworks people already use: LangGraph (middleware on every tool call), CrewAI (a pre-tool-call hook), AutoGen (an intervention handler) and MCP (middleware that checks the bearer token on every request, plus a decorator for each tool handler).

Is it fast enough?

On an Apple Silicon laptop, authorize() takes about 10 microseconds and exchange() about 28, against model calls that take hundreds of milliseconds. Out of 200,000 forged or tampered tokens, it accepted none. In the repo’s delegation benchmark (90 tools, 90 resources, 2,000 random tasks), a sub-agent holding a plain bearer token could reach all 8,100 tool-and-resource combinations. With a Ratchet token narrowed to its task, it could reach 1.5 on average.

Back to AWS

Here’s how those AWS failures look in an agent built with Ratchet. This isn’t a claim that Ratchet would have stopped them: they were bugs in AWS’s own server code. It’s that an agent built this way doesn’t depend on that kind of check.

AWS bulletin What failed With Ratchet
Jul 23 Policy skipped when it failed to load There’s nothing to load: the rules travel inside the token, and any error in authorize() is a denial.
Aug 3 Credentials sent to an attacker’s endpoint An arg_constraint pins the hostname argument to the brokers you expect.
Oct 27 A token for another app was accepted Tokens carry a resource caveat and are bound to their holder. A token for another service, or held by someone else, is denied.
Nov 10 A deny list missed some operation names tool_name caveats are an allow list matched against the whole name. A name that doesn’t match is denied.
Nov 11 A user made themselves admin Caveats can only be added. Nothing a caller sends can widen what its token allows.
Strands tools Safety switches the model could flip Pin them in the token, like arg_constraint_caveat("non_interactive", equals=False). The model can’t change what the token says.

And the ones it doesn’t fix: the read-only SQL checks in the Postgres and MySQL servers, the code injection in the DynamoDB server’s CDK generator, the S3 bucket-ownership bugs. The path traversals it can narrow, not fix. Those bugs live inside the tool.

What Ratchet doesn’t do (yet)

  • It doesn’t fix bugs inside a tool you’ve allowed. If a permitted call has a SQL injection, Ratchet won’t see it.
  • Argument checks are exact values or patterns. They can’t reason about the inside of a SQL query or a nested pipeline.
  • Narrowing follows fixed rules, not a formal proof. Restrictions are combined with AND, so adding one can only shrink what’s allowed, but nothing is checked by a solver.
  • Identity is self-issued for now. Each agent makes its own Ed25519 key. SPIFFE support is planned. For MCP over HTTP, binding is only as strong as how the server learns who’s calling, mTLS for example.
  • The broker runs in your process. There’s no hosted broker yet.

Try it

Ratchet v0.1.0 is open source under the MIT license, on GitHub and PyPI:

●●●[ bash ]
pip install ratchet-authz-core           # the broker
pip install ratchet-authz-langgraph      # or ratchet-authz-crewai, ratchet-authz-autogen

The MCP adapter is in the repo. If you find a way around the broker, please report it privately.