Critical AWS Vulnerability Fixed: How Amazon Patched a Dangerous EC2 SSM Agent Privilege Escalation Flaw


# Critical Vulnerability in Amazon EC2 SSM Agent Patched

Security researchers at Cymulate have uncovered a significant vulnerability in Amazon’s EC2 Simple Systems Manager (SSM) Agent that could have allowed attackers to gain root privileges and execute malicious code on affected systems.

The flaw, which has since been patched, stemmed from improper validation of plugin IDs within the SSM Agent. This component is widely used to remotely manage EC2 instances and on-premises servers across AWS environments.

## The Technical Vulnerability

The security issue was identified as a path traversal vulnerability in the “ValidatePluginId” function within pluginutil.go. According to researcher Elad Beber, this function failed to properly sanitize input, allowing attackers to inject path traversal sequences (such as “../”) into plugin IDs.

By crafting malicious plugin IDs (e.g., “../../../../../../malicious_directory”) when creating SSM documents, attackers could:

– Create directories in unauthorized locations
– Execute arbitrary scripts with root privileges
– Write files to sensitive system areas
– Escalate privileges for further system compromise

## Remediation

Following responsible disclosure on February 12, 2025, Amazon addressed the vulnerability on March 5, 2025, with the release of SSM Agent version 3.3.1957.0. The fix implemented a new “BuildSafePath” method specifically designed to prevent path traversal attacks in the orchestration directory.

Organizations using Amazon SSM Agent should ensure they’ve updated to the latest version to protect against this vulnerability.

Share This Article