Amazon has patched a vulnerability in the AWS Systems Manager agent that allows an authenticated attacker to bypass port forwarding restrictions. The flaw, identified as CVE-2026-89049, was disclosed in a GitHub advisory and affects the agent's handling of blocked addresses.
The agent maintains a blocklist of link-local addresses to prevent forwarding sessions from reaching internal instance services. However, the protection fails to validate equivalent representations of the same address, enabling an attacker to reach the EC2 instance metadata service at 169.254.169.254 by using an alternative notation.
Once access is gained, the attacker can retrieve temporary credentials associated with the instance's IAM role. These credentials can then be used to make API calls to AWS from outside the compromised machine, with permissions defined by the assigned role.
Versions of the agent prior to 3.3.4851.0 are affected. The fix is included in version 3.3.4851.0 and all later releases. AWS advises reviewing any custom builds derived from the agent and restricting access to the AWS-StartPortForwardingSessionToRemoteHost document used to initiate forwarding sessions.
Additional recommendations include auditing Session Manager activity for signs of misuse and reviewing IAM roles attached to instances to enforce the principle of least privilege.


