NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-5059: aws-mcp has a Command Injection Remote Code Execution Vulnerability

criticalCVSS 3.0 9.8GHSA-fgmx-xfp3-w28p

aws-mcp-server, the MCP server that runs AWS CLI commands for AI agents, has a command injection flaw in its allowed commands list handling. An unauthenticated remote attacker can run arbitrary code as the MCP server. The pip package aws-mcp is affected up to 1.7.0 and has no patched version.

Published Apr 11, 2026 · Updated Oct 27, 2026 · Analysis Oct 30, 2026

What an attacker can do

aws-mcp-server lets an agent run AWS CLI commands, and it restricts them with an allowed commands list. ZDI says the flaw is in how that list is handled: a user-supplied string is not validated before it is used in a system call (CWE-78). An attacker can use that to run their own commands instead of an allowed AWS CLI call.

The CVSS 3.0 vector is network, low complexity, no privileges, no user interaction, with high impact on confidentiality, integrity and availability. Code runs with the rights of the MCP server process. That process normally holds AWS credentials, so an attacker can act as that identity in your AWS account, and can also read local files and reach the host's network.

ZDI reports that the vendor rejected the report. So there is no vendor fix to wait for, and the risk stays for as long as the server is reachable.

Who is affected

The aws-mcp package on PyPI is listed as vulnerable at version 1.7.0 and earlier. ZDI names the product as aws-mcp-server by alexei-led.

Check your install:

pip show aws-mcp

Also look at where the server listens. A server reachable by other hosts is exposed to the unauthenticated attack, and one limited to a local stdio connection is much less so.

aws-mcp

Ecosystem
PyPI
Affected
<= 1.7.0
Fixed in
No patched version yet
Check
pip show aws-mcp

How to fix it

There is no patched version. The package entry shows no fixed release, and ZDI's advisory mentions no patch. ZDI says the only practical mitigation is to restrict interaction with the product.

In practice:

  • Stop exposing the server on a network. Keep it local, or behind authenticated access you control.
  • Run it with a narrowly scoped AWS role, not broad credentials.
  • Consider removing it until a fix exists.

How to tell if you were hit

The sources give no indicators. On the host, look for processes started by the MCP server that are not the aws CLI, such as shells or download tools, and for unexpected network connections from it. In AWS CloudTrail, review calls made by the credentials the server uses, looking for API calls you do not expect. Beam records agent shell commands and MCP tool calls, and its rules flag risky ones, which helps show what an agent sent to this server.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

aws-mcp-server AWS CLI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of aws-mcp-server. Authentication is not required to exploit this vulnerability.

The specific flaw exists within the handling of the allowed commands list. The issue results from the lack of proper validation of a user-supplied string before using it to execute a system call. An attacker can leverage this vulnerability to execute code in the context of the MCP server. Was ZDI-CAN-27969.

Credited to arnewouters.

Questions

Is there a patch for CVE-2026-5059?

No. The advisory data lists no patched version, and ZDI reports the vendor rejected the report in December 2025. Restrict access to the server.

Does CVE-2026-5059 require authentication?

No. ZDI states authentication is not required, and the CVSS vector scores no privileges and no user interaction.

Which versions of aws-mcp are affected by CVE-2026-5059?

Version 1.7.0 and earlier of the PyPI package aws-mcp. No later release is listed as fixed.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries