CODERED VTA

AWS Removes Flawed Remote Execution Example That Allowed Command Injection on Managed Instances

Medium
Server racks in a data centre
Photo by D Coetzee on Flickr

AWS has disclosed CVE-2026-122193, an OS command injection weakness in example code published in the set-up guide for Trusted Remote Execution, an open-source framework for running sandboxed scripts on managed instances. The flaw is not present in any shipped REX artifact version; it lives in a documentation example that created two AWS Systems Manager documents named Rex-RO and Rex-RW. Any organisation that followed the guide and created those documents is affected, in every account and region where the example was run. AWS has classified bulletin 2026-173-AWS as Important and requiring attention.

REX is built around a signed Cedar policy that is meant to act as the immutable security boundary around each script run. The example script handled input parameters in a way that let a user holding permission to invoke the SSM document supply crafted input, causing unintended operating system commands to run on the managed instance outside the REX sandbox. The scriptArgs parameter is affected by the same class of issue. AWS has not published a proof of concept or any further exploitation detail beyond that description.

The practical consequence is that the control REX exists to enforce does not hold for documents built from the withdrawn example: a principal meant only to run approved, policy-bound scripts can instead reach the underlying operating system of the instance. Because the weakness sits in a customer-created resource rather than in a package, there is no patched version to install and AWS lists no workaround, so the exposure persists in each account and region until the documents are gone. AWS has removed the example from the guide. FIRST EPSS places the probability of exploitation in the next thirty days at 1.6 percent, and no in-the-wild exploitation has been reported, which makes this scheduled remediation work for the next change window rather than an overnight incident response.

Attack Surface

Cloud Service, System Management Service, Infrastructure

Tactics

Execution, Defense Evasion, Privilege Escalation

Techniques

  • T1059 – Command and Scripting Interpreter
  • T1651 – Cloud Administration Command
  • T1078.004 – Valid Accounts: Cloud Accounts

SuperPRO's Threat Countermeasures Procedures

  1. Identify every AWS account and region in which the Trusted Remote Execution set-up guide example was run and the customer-owned SSM documents Rex-RO and Rex-RW were created, since AWS states that anyone who followed the guide is affected.
  2. Delete the affected documents with the SSM delete-document operation (for example aws ssm delete-document –name Rex-RO and aws ssm delete-document –name Rex-RW) in each account and region, as this is the only remediation AWS gives for CVE-2026-122193.
  3. Treat remediation as complete only when no Rex-RO or Rex-RW document remains in any account or region; AWS lists no workaround and no fixed REX artifact version, so deletion is the sole fix.
  4. Remove any copy of the withdrawn set-up example from internal runbooks, wikis and infrastructure-as-code templates so the Rex-RO and Rex-RW documents are not recreated after deletion, mirroring AWS removing the example from the guide.
  5. Record bulletin 2026-173-AWS and advisory GHSA-95g5-m242-wvhr against CVE-2026-122193 in your vulnerability tracker, noting that the issue affects a documentation example rather than a shipped REX release so version-based scanning will not detect it.
  6. Send any outstanding questions on scope or residual exposure to [email protected], the contact AWS provides in the bulletin.

Source

Code Red Cyber / VTA – coderedcyber.ai