CVE-2026-18654 Overview
CVE-2026-18654 is a key exchange without entity authentication vulnerability [CWE-322] affecting the Amazon Elastic MapReduce (EMR) Secure Shell (SSH) helper commands in the AWS Command Line Interface (CLI). The flaw exists in AWS CLI versions prior to 1.45.28 and AWS CLI v2 versions prior to 2.35.3. An attacker positioned on the network path between the AWS CLI client and the EMR cluster endpoint can intercept SSH sessions and file transfers initiated through the helper commands. The vulnerability stems from the helper's failure to authenticate the remote host before establishing the encrypted channel.
Critical Impact
Network-positioned attackers can intercept SSH sessions and file transfers to EMR clusters, exposing credentials, commands, and data in transit.
Affected Products
- AWS CLI v1 versions prior to 1.45.28
- AWS CLI v2 versions prior to 2.35.3
- Any workflow using the EMR SSH helper commands (for example aws emr ssh, aws emr put, aws emr get)
Discovery Timeline
- 2026-08-03 - CVE-2026-18654 published to the National Vulnerability Database (NVD)
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2026-18654
Vulnerability Analysis
The AWS CLI ships helper subcommands under aws emr that wrap SSH and SCP invocations against the primary node of an EMR cluster. These helpers construct the underlying SSH command line and rely on the operating system's SSH client to establish the connection. In the vulnerable versions, the helpers invoke SSH in a mode that skips strict host key verification against a trusted store. The client therefore performs a key exchange with whichever endpoint responds on the network, without confirming that endpoint's identity.
An attacker who can influence traffic between the operator's workstation and the cluster endpoint can present a substitute host key. Because entity authentication of the server never occurs, the client completes the key exchange with the attacker. Session traffic, including any commands issued and files transferred by the operator, then flows through the attacker in cleartext relative to the true endpoint.
Root Cause
The root cause maps to CWE-322: Key Exchange without Entity Authentication. The EMR SSH helper commands establish a cryptographic session before, or without, validating the identity of the remote host. Trust-on-first-use protections normally provided by SSH known_hosts are effectively suppressed by the helper's invocation pattern, removing the safeguard that would otherwise detect a substituted key.
Attack Vector
Exploitation requires an adversary to occupy a network position between the AWS CLI client and the EMR cluster's primary node. Feasible positions include compromised local networks, rogue Wi-Fi, hostile upstream infrastructure, VPN pivot points, or DNS or BGP manipulation that redirects the cluster hostname. Once positioned, the attacker terminates the operator's SSH or SCP session, presents an attacker-controlled host key, and relays traffic to the real cluster. The result is a transparent man-in-the-middle channel capturing shell input, output, and any files moved via the helper.
No verified exploit code is publicly available for CVE-2026-18654. See the GitHub Security Advisory GHSA-hqvf-45jj-mccq and AWS Security Bulletin 2026-071 for authoritative technical detail.
Detection Methods for CVE-2026-18654
Indicators of Compromise
- Unexpected SSH host key prompts or silent host key changes when connecting to EMR cluster endpoints
- EMR primary node SSH sessions originating from AWS CLI versions below 1.45.28 (v1) or 2.35.3 (v2)
- DNS responses for EMR cluster hostnames resolving to addresses outside the expected AWS IP ranges
- Unusual latency or TCP retransmission patterns during aws emr ssh, aws emr put, or aws emr get operations
Detection Strategies
- Inventory installed AWS CLI versions across workstations, build agents, and jump hosts, and flag anything below the fixed releases
- Correlate EMR API calls in CloudTrail (DescribeCluster, ListInstances) with subsequent outbound SSH connections to identify helper usage
- Alert on SSH sessions to EMR primary nodes that bypass known_hosts verification or use StrictHostKeyChecking=no
Monitoring Recommendations
- Capture command-line telemetry from developer and administrator endpoints to detect invocations of aws emr ssh, aws emr put, and aws emr get
- Monitor VPC Flow Logs for SSH traffic to EMR primary nodes traversing unexpected network paths or NAT gateways
- Track AWS CLI upgrade compliance through configuration management or endpoint inventory tooling
How to Mitigate CVE-2026-18654
Immediate Actions Required
- Upgrade AWS CLI v1 to 1.45.28 or later on every host where EMR helper commands are used
- Upgrade AWS CLI v2 to 2.35.3 or later, including in container images and CI/CD runners
- Rotate any SSH keys, IAM credentials, or secrets that may have transited an EMR SSH helper session on vulnerable versions
- Audit administrative activity on EMR clusters accessed via the helpers during the exposure window
Patch Information
Amazon addressed CVE-2026-18654 in AWS CLI v1 1.45.28 and AWS CLI v2 2.35.3. Refer to the AWS Security Bulletin 2026-071, the AWS CLI v1 Changelog, and the AWS CLI v2 Changelog for release notes and upgrade instructions.
Workarounds
- Avoid the aws emr ssh, aws emr put, and aws emr get helper commands on vulnerable CLI versions
- Connect to EMR primary nodes using a direct ssh invocation with an explicit, pre-populated known_hosts entry for the cluster host key
- Restrict EMR administrative access to sessions initiated from within the VPC through AWS Systems Manager Session Manager, removing the need for public SSH exposure
- Enforce network-layer controls such as security groups and PrivateLink endpoints to reduce opportunities for network positioning
# Verify and upgrade AWS CLI to a patched release
aws --version
# AWS CLI v1
pip install --upgrade 'awscli>=1.45.28'
# AWS CLI v2 (Linux x86_64 example)
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip && sudo ./aws/install --update
aws --version # confirm >= 2.35.3
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

