Hunting Exposed MCP Endpoints: A Red-Team Field Procedure
MCP moved onto the attacker's map this month — seven AWS CVEs in agent tooling in one week. Here's the field procedure for finding exposed MCP servers, versioning the runtimes, and testing the consent/symlink/secret-leak classes without touching production.
MCP moved onto the attacker's map this month. Amazon shipped seven CVEs in agent tooling inside a week — five in Language Servers for AWS, one in the ECS MCP Server, one in Strands Agents Tools (bulletin 2026-206). For anyone who hunts, that's a new surface to enumerate, not just a patch note. Here's the field procedure: map exposed MCP servers, version the runtimes, and test the abuse classes cleanly.
Key takeaways - An MCP server is a bridge with privileges — the agent's tool, holding credentials and acting with roughly your powers. The consent prompt is the boundary. - The surface is enumerable. Probe /.well-known/mcp, /mcp/sse and /messages on AI-named hosts; grep front-end JS for graphql-style op specs; list the registry allowlist on your own boxes. - The abuse classes are testable without production data — consent bypass, command injection, symlink boundary breaks, prompt-injection secret leakage, redirect key-forwarding. - Version drift is the finding. The plugin version isn't the runtime version; the whole fleet has to be checked against the bug windows. - Treat the agent runtime like SSH. New code path, new privileges, same patch cadence.
Why an operator gives this surface a look
Think about an MCP server the way you'd think about a library dependency with a network connection and a credential. The Model Context Protocol is the socket an agent uses to reach tools. Ask it to check a service and it doesn't poke the API itself — it talks to a server that holds the key and performs the action. You approve that server once, and from then on the agent calls it with approximately your powers.
Expose one to the internet, or ship a malicious workspace to a developer, and you've got code running with the developer or the estate's privileges. That's the prize this whole class is about.
Map the surface
Before any of this runs, you should be enrolled — in the program, or in authorized scope on an estate audit — and you should have enumerated the hosts you're allowed to touch. That asset list is the input for everything below, and it comes from two places: the in-scope list the program hands you, and the subdomains you surface in recon. If you're mid-engagement with no list, build one first:
subfinder -d example.com -silent | sort -u > hosts.txt
# or fold in the program's provided list, cert-transparency, whatever your recon produced
You run the probes from your own box against that hosts.txt. Nothing here requires credentials — for discovery it's plain GETs with a timeout and low volume, on hosts the scope doc covers. A six-second curl against a handful of paths per host is not scanning; it's enumeration.
Third-party MCP ends: probe in scope
On every domain that looks like it serves an AI/agent function — and many that don't — probe the well-known MCP paths:
for h in $(cat hosts.txt); do
for p in /.well-known/mcp /mcp /mcp/sse /messages /sse; do
code=$(curl -s -o /dev/null -w "%{http_code}" -m 6 "https://$h$p")
echo "$code $h$p"
done
done
A 200 or a 401 (route exists, auth required) beats a 404. Then separate a real MCP server from a vanity path: POST the protocol's initialize JSON-RPC and see if it answers with a server name and a tool list. A route that responds to initialize is a live, speakable MCP endpoint — and if it answers unauthenticated, it's an unauthorized surface with whatever that server can reach behind it. You've found that; you log it and stop. Don't start issuing tool calls against it; that's where abuse begins, and it's not where discovery ends.
Grep front-end JS the way you'd mine GraphQL ops — the bundles you just pulled from those same hosts. Fetch each app shell, pull its script bundles, then look for tool names, graphql-style op specs, and the config key that points at the API origin (BACKEND_URL, _API, the relative /graphql variants). Those strings are your map to the endpoints that aren't on well-known paths.
Your own ends: the registry allowlist
On boxes running an agent runtime, the invisible dependency graph is the MCP allowlist and, in registry mode, the servers that resolve from npm or PyPI. List the approved servers and ask who wrote each one. If the answer for any entry is a shrug, that's a finding — the same way an unpinned dependency in package.json is.
Version the runtime
The two bug boundaries that matter have version windows, and the plugin version does not tell you the runtime version.
- CVE-2026-137931 (consent fingerprint) affected the Language Servers for AWS
>=1.65.0 <1.78.0— fixed in 1.78.0 / npm@aws/lsp-codewhisperer0.0.127. - CVE-2026-137933 (code-review command injection) and CVE-2026-137934 (shell symlink boundary) affected
<1.81.0— fixed in 1.81.0 / npm 0.0.130, all per bulletin 2026-206.
On the estates you own or audit, that runtime isn't a service you maintain separately — it ships inside the IDE extension as @aws/lsp-codewhisperer. The extension's UI version and the runtime version are two different numbers. Where you deploy in a rollout, pin it like any dependency and read the resolved version from whatever inventory you keep; where you administer a developer's machine directly, resolve it in the plugin's install root:
npm ls @aws/lsp-codewhisperer # from the plugin's install directory
Anything under 0.0.130 sits inside at least one bug window, and the two consent bypasses are follow-ups to a fix that was itself bypassed twice more (CVE-2026-12957). The older the runtime, the more likely the boundary — the consent prompt or the workspace sandbox — doesn't actually do what it claims.
Test the abuse classes cleanly
Run these on a throwaway VM that matches the affected versions — reproduce the bug window first, then verify it. Use canary values: a fake secret, a harmless echo, a symlink you created. Stop at detection. This procedure confirms the class AWS already described; it is not a discovery hunt, and nothing here should ever touch a production task definition or a real credential.
- Consent bypass. CVE-2026-137931/2: change an approved server's launch configuration (environment variables, headers) and see whether a new consent prompt fires. A missing prompt on a config change is the bug.
- Command injection. CVE-2026-137933: the code-review tool passes agent-supplied file paths to a shell. Craft a workspace with a path that would run a harmless
echo, and note that the user need not request the review. - Symlink boundary. CVE-2026-137934/5: drop a symlink inside the workspace pointing outside it; a read-write-classified command should still trip the boundary. It won't, on older runtimes.
- Secret leakage by prompt injection. CVE-2026-135614 (ECS MCP Server
<0.1.36): give the troubleshooting tool a canary environment variable with a fake secret and confirm redaction holds (advisory). - Redirect key-forwarding. CVE-2026-137930 (Strands
<0.8.8): a tool bound by host allowlist follows a redirect; check whetherX-API-Keysurvives the hop (it does on old versions;Authorizationis stripped, per bulletin 2026-204).
A clean pass on one box tells you that box is clean. It does not clear the fleet.
What a clean test says, and what it doesn't
The honest output of this procedure is usually not 'we're fine' — it's a version ledger and an allowlist audit. The boxes on current runtimes with a reviewed allowlist are fine. The stale ones and the unidentifiable servers are the report.
How many MCP servers did you approve last month? Go look at the allowlist. If you can't name who wrote the code each one runs, you don't have a consent model — you have a wish.
My position: the consent prompt was never a boundary, it's a speed bump — and every bypass in this batch is proof you can't fix a trust problem with a dialog box. The fix carries a real cost: treat the agent like a dependency. No ambient cloud credentials. A separate least-privilege user, read-only tool access where the workflow allows it, and a review of every server like source code. The credentials you do keep belong in a vault [AFFILIATE: 1Password], not in a task-definition environment variable. The friction is the point. A thing with your powers gets as few powers as it can work with.
The pattern that keeps repeating
The same week gave the client-side twin. Scott Helme's analysis shows malicious JavaScript served through Optimizely to 178 organizations — Zoom, the BBC, CNN, Salesforce, GitLab, IKEA, HSBC, Equifax, Ledger — swapping wallets, skimming cards, dropping iOS exploit kits on iPhone visitors. Intigriti's Bug Bytes #242 flagged it the same way: trusted third-party code, compromised, nobody's own site breached. Server-side or client-side, the code you didn't write is where the attack lands.
The next wave is agent-to-agent traffic and MCP marketplaces with their own registry modes. Map the surface, version the runtime, prune the allowlist — the same discovery habit that finds your other exposed services finds these, and the same server discipline keeps them patched. What AI chatbots do with your data is the privacy half of this story; the runtime is the infrastructure half. The perimeter moved inside your IDE.