5 Alarming Ways Hackers Exploit SSRF Bugs on AWS EC2 to Hijack Credentials


Exploitation volumes

Overview of the Security Breach

In a sophisticated attack, cybercriminals leveraged Server-Side Request Forgery (SSRF) vulnerabilities targeting websites operating on AWS EC2. The exploit permitted unauthorized access to the EC2 Metadata Service, risking exposure of Identity and Access Management (IAM) credentials from older IMDSv1 endpoints.

The intrusion allows hackers to elevate their privileges, gaining control over AWS services such as S3 buckets—leading to potential data breaches, manipulation, and severe operational disruptions. This breach was meticulously documented by researchers at F5 Labs, with the peak of malicious activities occurring from March 13 to 25, 2025.

How the Attack Unfolded

SSRF vulnerabilities are critical web flaws that deceive a server into performing requests to internal resources, typically inaccessible to an outside attacker. In the observed incidents, attackers pinpointed EC2-hosted websites with such vulnerabilities to:

  • Remotely query internal EC2 Metadata URLs.
  • Extract sensitive data, including network configurations and security credentials.

The metadata service, designed to be accessible only from within the virtual machine, becomes a gateway for attackers when secured improperly. Instances primarily affected were utilizing the outdated IMDSv1 service, lacking the robust authentication measures found in the newer IMDSv2.

Exploitation Techniques and Impact

From March 13 to March 25, adversaries executed extensive SSRF probes, employing tactics that included rotating query parameter names and subpaths used in attack vectors. This systematic approach underscored the precision with which these cyber assailants operated to plunder vulnerable systems.

Broad Implications of SSRF Attacks on EC2

The March 2025 threat trends report by F5 Labs highlights the persisting threat from SSRF attacks. They detailed the month’s most exploited vulnerabilities, including:

  • CVE-2017-9841: Remote code execution vulnerability in PHPUnit
  • CVE-2020-8958: Command injection flaw in Guangzhou ONU OS
  • CVE-2023-1389: Command injection issue in TP-Link Archer AX21
  • CVE-2019-9082: Injection vulnerability in ThinkPHP

The persistent exploitation of older vulnerabilities indicates a severe need for updated security measures and vigilance. To mitigate these and newer threats, organizations are advised to update security patches promptly, enhance router and IoT configurations, and replace outdated networking hardware.

Rising to the Challenge of Cyber Security

As malicious threats evolve rapidly, securing digital assets against SSRF and other vulnerabilities remains critical. By understanding attacker methodologies, businesses can better safeguard their environments against these insidious cyber threats.

Related: Major Security Breach: Over 150,000 Emails Compromised at U.S. Treasury’s OCC

Last Updated: April 9, 2025