CVE-2026-134070 in AWSConfigRemediation-EnableSystemsManagerSessionManagerAuditLogsToS3
Summary
by MITRE • 11/25/2026
Improper input validation in the AWS-managed AWS Systems Manager Automation runbook AWSConfigRemediation-EnableSystemsManagerSessionManagerAuditLogsToS3 might allow an authenticated remote user who is permitted to run the runbook to set unintended configuration in the account's Regional Session Manager preferences document (SSM-SessionManagerRunShell) via a crafted S3KeyPrefix parameter value. This applies only when that document does not already exist in the Region. The unintended configuration can include arbitrary commands, which then run on managed instances when other users start Session Manager sessions.
Because any user permitted to run the runbook selects which revision to run, this issue remains reachable in an affected Region until earlier revisions can no longer be run there. AWS is deprecating all revisions created before 2026-10-22 (UTC) in every Region and partition beginning January 15, 2027; until deprecation, earlier revisions remain runnable, so upgrading alone is not sufficient.
To remediate this issue:
1. Run the latest revision of the runbook. The latest revision is the fixed revision in every Region where the runbook is available, and its revision number varies by Region. To find it, run aws ssm describe-document --name AWSConfigRemediation-EnableSystemsManagerSessionManagerAuditLogsToS3 --region <region> --query "Document.LatestVersion". Update any Automation executions, State Manager associations, AWS Config remediation configurations, or other automations pinned to an earlier revision to use the latest revision. 2. Until earlier revisions are removed in your Region, either keep untrusted users from running earlier revisions of the runbook, or keep a trusted Session Manager preferences document (SSM-SessionManagerRunShell) in every Region. Earlier revisions inject only when they create this document, so while a trusted one exists, this path is closed in that Region. 3. Review your Session Manager preferences document (SSM-SessionManagerRunShell) in any Region where it was first created by an earlier revision of this runbook, not by you. To check, look for any run of this runbook that failed with "DOCUMENT CREATE OR UPDATE FAILED." An injected run always fails with this error. You can also compare the creation date of the document's first version with the start times of runs of this runbook in that Region. Check the document for settings you did not configure, especially shellProfile, Run As (runAsEnabled, runAsDefaultUser), maxSessionDuration, idleSessionTimeout, and the logging destination fields. The fixed runbook updates only the S3 bucket and prefix fields of an existing preferences document, so settings injected earlier remain until you remove them. If you find unexpected settings, restore your trusted preferences and review instances on which Session Manager sessions were started while those settings were active. The AWS Security Bulletin includes commands for this review.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/28/2026
The vulnerability identified in the AWS Systems Manager Automation runbook named AWSConfigRemediation-EnableSystemsManagerSessionManagerAuditLogsToS3 represents a critical flaw rooted in improper input validation, specifically categorized under CWE-20: Improper Input Validation. This issue allows an authenticated remote user with permissions to execute this specific automation document to manipulate regional Session Manager preferences by supplying a crafted S3KeyPrefix parameter value. The core technical failure occurs when the targeted Regional Session Manager preferences document, identified as SSM-SessionManagerRunShell, does not already exist within the specified AWS Region. In such scenarios, rather than simply configuring audit logging parameters on an existing structure, the runbook inadvertently creates or overwrites this global preference document with unintended configurations. This behavior effectively bypasses standard access controls for Session Manager settings because the creation of a new document is treated as a legitimate administrative action by the underlying service logic, despite being triggered through a remediation automation intended solely for logging configuration.
The operational impact of this vulnerability is severe and persistent due to the versioning mechanism inherent in AWS Systems Manager Automation documents. Because users can select which revision of a runbook to execute, any earlier revisions that contain this flaw remain exploitable until they are explicitly deprecated by AWS. The deprecation schedule indicates that all revisions created before October 22, 2026, will be disabled starting January 15, 2027. Consequently, simply upgrading the reference in an automation workflow to a newer revision is insufficient if older versions remain executable and have not yet been retired by AWS infrastructure. An attacker with access to run these legacy revisions can inject arbitrary commands into the SSM-SessionManagerRunShell document. These injected settings are then applied globally within that region, affecting all subsequent Session Manager sessions initiated by any user on managed instances. This aligns with ATT&CK technique T1098: Account Manipulation, as it involves altering system configurations to maintain persistence or facilitate unauthorized access through modified session behaviors.
The specific nature of the unintended configuration allows for significant lateral movement and privilege escalation potential within an AWS environment. By injecting settings such as shellProfile, Run As (runAsEnabled, runAsDefaultUser), maxSessionDuration, idleSessionTimeout, and logging destinations into the preferences document, an attacker can force sessions to execute under different user contexts or redirect audit logs to controlled locations for exfiltration purposes. The vulnerability is particularly insidious because it targets a global preference document that influences all users in the region. If the SSM-SessionManagerRunShell document does not exist prior to the execution of the malicious runbook, the automation creates it with the attacker-controlled parameters. This means that even if subsequent revisions fix the input validation logic for existing documents, they do not retroactively clean up or secure a document created by an earlier vulnerable revision unless explicitly managed by administrators.
To mitigate this risk, organizations must adopt a multi-layered remediation strategy focusing on version control and configuration auditing. The primary step is to ensure that all Automation executions, State Manager associations, AWS Config remediation configurations, and other automated workflows are pinned to the latest available revision of the runbook in every region where it is deployed. Administrators should utilize the aws ssm describe-document command with the LatestVersion query parameter to identify the current fixed revision number for each specific region. It is crucial to update any hardcoded references or associations that might still point to older, vulnerable revisions. Until AWS deprecates these earlier versions in January 2027, relying solely on version updates is not a complete defense if legacy executions remain possible through other means such as manual runs or unupdated integrations.
In addition to updating runbook references, security teams must actively monitor and manage the existence of the SSM-SessionManagerRunShell document across all regions. If this document already exists in a region before any execution of the vulnerable runbook, the injection path is effectively closed because the fixed logic only updates specific logging fields rather than recreating the entire preference structure. Therefore, ensuring that trusted versions of this preferences document are present and maintained can serve as a protective measure against new injections from older revisions. Administrators should review their Session Manager preferences in every region to verify whether they were created by legitimate administrative actions or inadvertently generated by previous runs of this runbook. Indicators of compromise include checking for automation executions that failed with the error message DOCUMENT CREATE OR UPDATE FAILED, which suggests an injection attempt was blocked because a document already existed but potentially contained malicious settings from prior successful injections in other regions or earlier times.
Finally, comprehensive auditing is required to identify and remediate any existing damage caused by this vulnerability. Organizations must inspect the SSM-SessionManagerRunShell documents for unexpected configurations such as unauthorized shell profiles, altered Run As defaults, modified session timeouts, or suspicious logging destinations that were not configured by internal teams. The creation date of each document version should be cross-referenced with the start times of runbook executions to pinpoint when malicious settings may have been introduced. If compromised settings are detected, administrators must restore trusted configurations and review all managed instances where Session Manager sessions were active during the period those settings were in effect. This forensic analysis is critical for detecting any unauthorized access or command execution that occurred while the system was vulnerable. The AWS Security Bulletin provides specific commands to facilitate this investigation, ensuring that no residual backdoors or persistence mechanisms remain within the environment after remediation efforts are completed.