# MCP servers are a short path to your cloud credentials

> Three October flaws in AI agent tooling, in the AWS API MCP Server, Google's Cloud Run MCP server and OpenCode, each ended at real cloud credentials or a developer's machine. Why agent tools are privileged principals and how to scope them on AWS.

Published November 17, 2026 by Antivenom · https://antivenom.ai/blog/mcp-servers-path-to-cloud-credentials

In late October, three separate flaws in AI agent tooling were made public. The [AWS API MCP Server](https://aws.amazon.com/security/security-bulletins/2026-152-aws/) accepted OAuth tokens meant for other applications. Google's [Cloud Run MCP server](https://app.opencve.io/cve/CVE-2026-85297) could be tricked by bucket squatting into what its CVE record calls service account takeover. And [OpenCode](https://www.pillar.security/blog/open-and-shut-remote-code-execution-in-opencode-via-mcp-oauth), an open-source coding agent, could run a command from a malicious MCP server on Windows and WSL during sign-in.

Three vendors, three different bugs. Each one ends in the same place: the credentials the tool was given to do its job.

## What happened

![Diagram: three flaws, three entry points. A token for another app is accepted by the AWS API MCP Server, a squatted bucket receives Cloud Run MCP uploads, and a sign-in URL runs a command in OpenCode. All three end at the tool's credentials. Under them, the controls that break each path.](/blog/mcp-servers-path-to-cloud-credentials.svg)

**AWS API MCP Server, CVE-2026-115413.** This open-source server lets an AI assistant run AWS API calls. It can run over the streamable-http transport with OAuth. AWS says that in versions 1.3.0 up to 1.6.0, the server [checked a token's signature, issuer and expiry, but not the claim that names the application](https://aws.amazon.com/security/security-bulletins/2026-152-aws/) the token was issued for. A token issued to another application in the same identity provider tenant was accepted, which could allow AWS API calls with the credentials configured on the host. The [CVE record](https://app.opencve.io/cve/CVE-2026-115413) scores it 7.8 and describes the attacker as a local user. The fix is 1.6.0, plus one setting: if you use `AUTH_TYPE=oauth`, set `AUTH_AUDIENCE`, or `AUTH_CLIENT_ID` for providers such as Amazon Cognito whose access tokens carry no audience claim.

**Cloud Run MCP, CVE-2026-85297.** Google's MCP server deploys code to Cloud Run. Before 1.11.0, it used a default storage bucket named after the project. The [fix that shipped in 1.11.0](https://github.com/GoogleCloudPlatform/cloud-run-mcp/pull/300) adds a check that the bucket actually belongs to the caller's project, and falls back to a random name if it does not. Without that check, someone who created a bucket with the expected name first could receive the uploads. Google's [CVE record](https://app.opencve.io/cve/CVE-2026-85297) says this could let an attacker access source code, execute code and exfiltrate data. It scores 7.7 on CVSS 4.0.

**OpenCode, no CVE.** [Pillar Security reports](https://www.pillar.security/blog/open-and-shut-remote-code-execution-in-opencode-via-mcp-oauth) that OpenCode 1.0.137 through 1.18.32 on Windows and WSL passed the sign-in URL from a remote MCP server to a browser helper that did not escape it. A crafted address could run a command on the developer's machine, with the developer's access. It triggers when the developer starts the OAuth sign-in with that server, [according to The Hacker News](https://thehackernews.com/2026/10/opencode-flaw-lets-malicious-mcp.html), not when the server is merely configured. macOS and Linux were not affected. The fix shipped in 1.18.33 on September 28 without a security advisory, and the maintainers said a malicious MCP server is outside their threat model. Pillar rates it 9.8. No CVE was requested, so scanners will not flag old versions.

None of the advisories or write-ups reports that any of the three was exploited.

## Why it worked

Each bug is ordinary on its own. A missing audience check is a classic OAuth mistake. Bucket squatting is a known cloud storage problem. Unescaped input to a shell is one of the oldest bugs there is.

What is new is where these bugs live. **An MCP server is a process that holds real credentials and takes instructions from a model.** The AWS API MCP Server holds whatever AWS credentials are on its host. The Cloud Run MCP server deploys with a Google Cloud identity. A coding agent runs as the developer, next to their cloud CLI profiles and SSH keys.

So the security of the tool sets the security of the credential. If the tool trusts the wrong token, the wrong bucket or the wrong URL, the credential goes with it.

The OpenCode case adds a second lesson. A remote MCP server that you added last month is not the same server next month. [Pillar notes](https://www.pillar.security/blog/open-and-shut-remote-code-execution-in-opencode-via-mcp-oauth) that a trusted server can become hostile through a compromise, a hijacked registry entry or an expired domain. Trust in a server is not a one-time decision.

## What it means on AWS

Treat every MCP server and agent runtime as a privileged principal, the same way you treat a CI system or a deploy role.

- **Give it its own identity.** An MCP server should not run with a developer's admin profile or a shared role. Create a role for it, with a name you can find in CloudTrail.
- **Scope that identity to the job.** If the assistant only needs to read CloudWatch logs and describe EC2 instances, that is the whole policy. Add a permissions boundary so the role cannot grant itself more, for example by denying `iam:*` and `sts:AssumeRole` outside a short list.
- **Prefer short-lived credentials.** IAM Identity Center sessions or role credentials with a short session duration, not long-lived access keys in `~/.aws/credentials`.
- **Watch it like a principal.** Filter CloudTrail by the tool's role ARN. Alert on first use of a new service, new Region or any write action you did not expect, such as `CreateAccessKey` or `PutRolePolicy`.
- **Check the transport.** For the AWS API MCP Server, AWS's workaround is to use the default stdio transport instead of streamable-http if you cannot upgrade. A local stdio server has no network-facing login to get wrong.

## What to do this week

- **Upgrade.** awslabs.aws-api-mcp-server to 1.6.0 or later, and set `AUTH_AUDIENCE` or `AUTH_CLIENT_ID` if you use OAuth mode. Cloud Run MCP to 1.11.0 or later. OpenCode to 1.18.33 or later on every Windows and WSL machine.
- **Check versions by hand where there is no CVE.** Dependency scanners will not flag OpenCode. Ask your developers, or check your endpoint inventory.
- **List remote MCP servers.** For each one, write down who runs it, what it can reach and whether you still need it. Remove the ones nobody can vouch for.
- **Review cloud activity from the tools' identities** for the period the affected versions ran. Rotate those credentials if you cannot rule out misuse.
- **Separate agent identities from human ones.** If your AWS API MCP Server is using an engineer's personal profile today, that is the first thing to change.
- **Run the agent with less.** A coding agent in a container or VM without your production profiles cannot leak them.

## The pattern

Three bugs from three vendors in a few days does not mean MCP is broken. It means agent tools are now part of the path to your cloud account, and they get the same mistakes every new class of software gets. The difference is that these tools often start with broad access, because it is easier to give an assistant everything than to work out what it needs.

Antivenom treats agent tools as principals on that path. Our AI red team runs only against your own systems, with your permission, and maps what each tool's identity can actually reach. The AI blue team narrows the role, and the red team walks the path again to prove the narrower role holds.

For more on mapping that path, read [your AWS perimeter is a graph of who can become whom](https://antivenom.ai/blog/iam-who-can-become-whom).
