/

CVE-2026-122193

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Trusted Remote Execution

CVE-2026-122193

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Root-Level Command Execution and Cedar Policy Bypass

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An OS command injection vulnerability in the example SSM document provisioning script for Trusted Remote Execution (REX) may let an authenticated remote user run arbitrary commands as root on a managed instance. The risk arises when the user is allowed to invoke a Rex-RO or Rex-RW document created from the example script, potentially bypassing Cedar policy enforcement.

Affected context

The issue concerns Rex-RO and Rex-RW SSM documents created using the REX example provisioning script before 2026-07-28. It may affect managed instances where those documents remain available for invocation; exposure depends on account and Region configuration and which users are authorized to run them.

Exploit preconditions

  • Attack surface: Invocation of a Rex-RO or Rex-RW SSM document on a managed instance
  • Required access: An authenticated remote user permitted to invoke the affected document
  • Trigger point: Processing of input by the document's command-execution logic
  • Why exploitation is possible: The example script can construct commands in a way that allows OS command injection, potentially executing them as root and bypassing Cedar policy enforcement

Why this happens

The underlying issue is OS command injection, mapped to CWE-78. The vulnerable pattern occurs when data that may be influenced by a caller is incorporated into an operating-system command without adequate separation or safe handling. In this case, the example SSM document provisioning script can allow command execution with root privileges when an authorized user invokes an affected document.

Potential impact

  • An attacker with the required document permissions could execute arbitrary commands as root on a managed instance.
  • Instance data or services could be altered, disrupted, or accessed.
  • Cedar policy enforcement could be bypassed for actions performed through the affected execution path.
  • Compromise of a managed instance could create opportunities for further impact in its environment.

General mitigation guidance

Reduce exposure by identifying and deleting Rex-RO and Rex-RW SSM documents created from the example script in every account and Region where it was run. For command execution designs, prefer APIs that pass arguments without invoking a shell; where shell use is necessary, avoid building commands from caller-controlled data and apply strict validation. Limit who can create or invoke SSM documents, use least-privilege execution identities, and retain policy enforcement at the points where actions are authorized.

How teams detect issues like this

  • Inventory SSM documents across accounts and Regions to identify Rex-RO and Rex-RW documents created from the example script.
  • Review document definitions and provisioning code for shell command construction that incorporates caller-controlled values.
  • Use static analysis rules to flag shell execution APIs and unsafe command interpolation.
  • Monitor document creation, modification, and invocation events, and enforce policies that restrict document permissions and command-execution patterns.

Sources

SourceLink
aws.amazon.comaws.amazon.com/security/security-bulletins/2026-173-aws/
github.comgithub.com/trusted-remote-execution/trusted-remote-execution/security/advisories/GHSA-95g5-m242-wvhr

Frequently asked

questions

An authenticated remote user who is permitted to invoke an affected Rex-RO or Rex-RW SSM document may be able to exploit it.

Direct interactive access is not specified as a prerequisite. The described access requirement is permission to invoke an affected SSM document.

Identify and delete affected example-created documents in every account and Region where the script was run. For command execution, avoid shell interpretation of caller-controlled input and apply least privilege.

Prefer APIs that separate commands from arguments, review command-building code for unsafe interpolation, restrict document creation and invocation permissions, and monitor SSM document changes and use.

Find out what's already
exploitable in your codebase.