CVE-2026-5059 aws-mcp-server AWS CLI Command Injection Remote Code Execution Vulnerability

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code on aws-mcp-server installations without authentication due to improper validation of user-supplied strings in command handling.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-5059?

CVE-2026-5059 is a critical command injection vulnerability in aws-mcp-server, published on 11 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-78

Which versions are affected by CVE-2026-5059?

3 open source packages ship an affected version, including aws-mcp.

PackageAffectedFixed in
aws-mcp PyPIAll versions to 1.7.0None
aws-mcp PyPIAll versions to 1.7.0None
aws-mcp PyPIAll versions to 1.7.0None

How do I fix CVE-2026-5059?

No fix has been published for CVE-2026-5059 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-5059 being exploited?

There is no known exploitation of CVE-2026-5059 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-fgmx-xfp3-w28p, PYSEC-2026-288.

Is CVE-2026-5059 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free