☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
AMZN logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 6.8 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N 🐛 CWE-322
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-18654

CVE-2026-18654
📅 PUBLISHED: 2026-08-03 00:00 UTC 🔄 UPDATED: 2026-09-23 20:25 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.29%
👁️
0.29% probability
7.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1557
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: United States License: Commercial
Patch available — upgrade to latest release
CVSS VECTOR BREAKDOWN 6.8
AV: N Attack Vector Network
AC: H Attack Complexity High
PR: N Privileges Required None
UI: N User Interaction None
S: C Scope Changed
C: H Confidentiality High
I: N Integrity None
A: N Availability None
6.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-18654 is a man-in-the-middle (MITM) vulnerability affecting key exchange without entity authentication in the EMR SSH helper commands shipped with the Amazon Web Services (AWS) Command Line Interface (CLI). Versions of AWS CLI v1 prior to 1.45.28 and AWS CLI v2 prior to 2.35.3 are vulnerable. An attacker positioned between the client and the Amazon EMR cluster endpoint can intercept SSH sessions and file transfers, leading to full confidentiality loss of data transmitted through these channels. The vulnerability carries a CVSS base score of 6.8, with a high impact on confidentiality, and requires no privileges or user interaction, although exploitation requires network positioning and moderately complex attack conditions. The affected CLI tools are widely deployed across enterprise environments for cluster management, making secure upgrade adoption a critical priority.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The vulnerability resides in the Amazon EMR SSH helper commands—specifically the aws emr ssh command and its underlying helper utilities (ssh, scp, sftp wrappers) that AWS CLI invokes to establish secure connections to EMR cluster nodes. The flaw is categorized under CWE-322 ("Key Exchange without Entity Authentication"), indicating that the SSH key exchange process fails to properly authenticate the identity of the remote server before establishing a session.

Vulnerability Mechanism

When a user executes aws emr ssh --cluster-id j-XXXX --key-pair-file key.pem, the CLI contacts the EMR service API to resolve the cluster's master node public DNS name. The CLI then constructs an SSH command that connects directly to that endpoint. The vulnerability exists in how the CLI handles the SSH host key verification process. Specifically:

  1. Missing or Weak Host Key Pinning: The EMR SSH helper does not perform strict host key checking against a pre-populated known_hosts file. Instead, it relies on the EC2 instance's dynamically-generated host key that is fetched via the EMR API.

  2. Unauthenticated Key Retrieval: The helper fetches the cluster's SSH host key or connection details over the same network path used for the actual SSH connection. An attacker performing on-path network manipulation (ARP spoofing, DNS poisoning, BGP hijacking) can intercept this bootstrap exchange and substitute their own host key.

  3. Entity Authentication Gap: Because the EMR SSH helper does not cross-validate the fetched host key against an out-of-band trusted source (e.g., AWS Instance Identity Documents signed with AWS KMS keys, or the EC2 metadata service), the client cannot distinguish between a genuine EMR node and an attacker-controlled endpoint.

Attack Surface

The attack surface is broadened by the following factors:

  • IPv4 vs IPv6 handling: If the EMR endpoint resolution returns an IPv6 address and the attacker can manipulate neighbor discovery (NDP spoofing) on the local network segment, they can reliably redirect traffic.
  • Proxy and gateway traversal: In hybrid networks where the client communicates with EMR through a corporate proxy or VPN gateway, any intermediary that can intercept that traffic is a viable MITM position.
  • DNS rebinding/local resolution: The EMR CLI in v1 and v2 may perform DNS lookups for the endpoint; if the attacker controls or poisons the local resolver cache, they can direct the connection to a rogue host.
  • AWS-specific service impersonation: Because the CLI contacts the EMR API (elasticmapreduce service) over TLS, an attacker who can ARP-spoof the local gateway can redirect the initial API call (before TLS) or the subsequent SSH connection (plaintext protocol negotiation) — depending on the network topology, the attacker may only need to intercept the SSH phase.

Code-Level Context

From a code perspective, the EMR SSH helper in AWS CLI v2 is implemented in Python (awscli/customizations/emr/ssh.py and related modules). The helper performs the following steps:

  1. Calls boto3 to get cluster details and the master node's public IP/DNS.
  2. Requests the cluster's ServiceRole and EC2InstanceProfile to infer security group settings.
  3. Builds an SSH command string with options like -o StrictHostKeyChecking=no in certain default configurations, or without -o UserKnownHostsFile=/dev/null restrictions that would enforce host key verification against a known file.

The absence of -o StrictHostKeyChecking=yes or explicit -o HostKeyAlias handling means the connection is susceptible to a first-connection MITM attack. The fix in versions 1.45.28 and 2.35.3 likely introduces explicit host key verification against the EMR node's actual keys (obtained via the EC2 instance's Spot Instance Request or similar authenticated sources).

Exploitation Scenarios

The following step-by-step attack chain details how an attacker executes a MITM attack against a target using AWS CLI EMR SSH helper with this vulnerability:

Prerequisites for the attacker:

  • Network positioning on the same L2 segment as the target client, or control of a DNS resolver, gateway, or any network path between the client and the EMR cluster.
  • Ability to run a server that terminates SSH connections and extracts the session content.

Attack Chain Steps:

  1. Reconnaissance and Target Identification:

    • The attacker monitors network traffic on the shared segment (e.g., corporate LAN, co-working space) using passive packet capture (tcpdump/tshark) to identify users executing aws emr ssh commands. They can detect EMR-related traffic by looking for traffic to AWS EMR API endpoints (elasticmapreduce.<region>.amazonaws.com) followed by SSH connections to EC2 nodes on port 22.
    • Alternatively, the attacker uses ARP spoofing (arpspoof -i eth0 -t target_ip gateway_ip) to redirect the victim's outbound traffic through their machine.
  2. Trigger / Weaponization:

    • The attacker ARP-spoofs the default gateway to intercept all victim traffic destined to external IPs.
    • The victim executes aws emr ssh --cluster-id j-ABCDEF123456 --key-pair-file prod-key.pem.
    • The AWS CLI (vulnerable version) resolves the master node's public DNS (e.g., ec2-54-123-45-67.us-west-2.compute.amazonaws.com) via standard DNS. Since the reoslution happens over the network, the attacker (who now controls the ARP response for upstream) can also answer DNS queries (using dnsspoof -f dnsmap.txt) to redirect the DNS response to an attacker-controlled IP (e.g., 203.0.113.10).
    • The CLI then issues the SSH connection attempt to ec2-54-123-45-67.us-west-2.compute.amazonaws.com, which now routes to the attacker's IP.
    • Crucially, the vulnerable CLI does NOT enforce StrictHostKeyChecking=yes with a trusted known_hosts file. Instead, it accepts any host key presented during the key exchange. The attacker's SSH daemon (running openssh-server on 203.0.113.10) presents its own host key. The client accepts this key because the EMR helper did not pre-populate a known_hosts entry or perform out-of-band verification.
  3. Payload and Execution:

    • Session Interception: The attacker runs an SSH MITM proxy (e.g., ssh-mitm or a custom sshj proxy). When the victim connects, the attacker establishes a front-end SSH session with the victim (presenting their own host key), and a back-end SSH session to the real EMR master node (presenting the attacker's credentials or using the forwarded agent). All keystrokes, session output, and file transfer content (scp, sftp) are logged to the attacker's disk.
    • Credential Harvesting: If the victim uses SSH agent forwarding (-A flag), the attacker can forward the agent socket and request signatures for any private keys in the victim's agent, enabling lateral movement to other cluster nodes or other AWS resources that share the same key.
    • Data Exfiltration: For file transfers (aws emr scp -i key.pem ec2-user@...:~/data/orc_files/ /local/dir/), the attacker can selectively modify files before forwarding them to the real destination, planting malware or altering spark/EMR distribution scripts.
  4. Post-Exploitation Impact:

    • The attacker now possesses valid AWS access keys or SSH keys from the agent (if forwarded), plus all transferred data.
    • They can leverage the EMR cluster's IAM roles to perform additional AWS actions (e.g., reading S3 buckets the cluster has access to via its instance profile).
    • The compromised session may contain sensitive analytics data, production source code, or cloud infrastructure credentials, leading to a compounded breach of the broader AWS environment.

Impact Assessment

Confidentiality Impact (High per CVSS): The primary impact is the unauthorized disclosure of all SSH session content, including command output, file contents, and credentials. The CVSS vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N indicates high confidentiality impact that spans beyond the single vulnerable component (SC — Scope Changed). This means the attack can impact other resources (e.g., other EMR nodes, S3 buckets, or even other AWS accounts if cross-account roles are assumed).

Integrity and Availability Impact (None per CVSS): The CVSS score lists no integrity or availability impact, but this may be misleading in real-world exploitation where an attacker can inject files into an scp transfer or run commands that alter cluster state. These actions are possible but not required for the core Confidentiality Impact.

Affected Systems:

  • Enterprise SOCs and data engineering teams using aws emr ssh for cluster debugging.
  • CI/CD pipelines that run automated scp/sftp commands against EMR nodes.
  • Any AWS CLI v2 (<2.35.3) or v1 (<1.45.28) installation where users connect to EMR clusters from untrusted or shared network segments.

Blast Radius:

  • Compromised SSH sessions expose sensitive analytics data, code, and keys.
  • If SSH agent forwarding is used, the blast radius extends to all hosts accessible via the keys loaded into the agent, which may include production EC2 instances, RDS databases, and other EMR clusters.
  • The synthetic nature of the attack (network-level) means it is invisible to application-layer AWS CloudTrail logging and requires network-layer monitoring for detection.

Detection Guidance

Sigma Rule

title: AWS CLI EMR SSH Helper Attempting SSH with Disabled Host Key Verification
id: 9a4f66b8-3c1e-11ef-8b8b-0242ac120002
status: experimental
description: Detects AWS CLI EMR SSH helper processes that invoke ssh with configuration flags that disable strict host key checking, indicating a potential MITM vulnerability (CVE-2026-18654) exploitation.
author: Cyber Intel Team
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        ParentImage|endswith:
            - '/aws'
            - '/awscli'
        Image|endswith:
            - '/ssh'
            - '/scp'
        CommandLine|contains|all:
            - '-o StrictHostKeyChecking=no'
            - 'emr'
    condition: selection
level: high
falsepositives:
    - Legitimate debugging scenarios where users intentionally disable host key checking for quick cluster access
fields:
    - CommandLine
    - User
    - Hostname
tags:
    - attack.t1557
    - attack.t1190
    - cve.2026.18654

YARA Rule

rule AWS_EMR_SSH_MITM_Python_Helper {
    meta:
        author = "Valter Sec Threat Intel"
        description = "Detects known vulnerable Python source patterns in AWS CLI v2 EMR SSH helper (CVE-2026-18654)"
        date = "2026-07-01"
        cve = "CVE-2026-18654"
    strings:
        $s1 = "subprocess.check_call" ascii nocase
        $s2 = "emr" ascii nocase
        $s3 = "ssh" ascii nocase
        $s4 = "StrictHostKeyChecking=no" ascii nocase
        $s5 = "get_ssh_relay" ascii nocase
        $s6 = "/dev/null" ascii
        $s7 = "-o" ascii
    condition:
        uint32(0) == 0x04030201 and
        3 of ($s*) and $s3 and $s4
}

Suricata IDS Rule

alert tcp any any -> any 22 (msg:"ET EXPLOIT AWS CLI EMR SSH MITM CVE-2026-18654 - SSH Banner Followed by Unusual Key Exchange Negotiation"; flow:to_server; content:"SSH-2.0"; depth:6; content:"|00 00 00 0c|"; distance:0; within:12; dsize:>100; threshold:type limit, track by_src, count 3, seconds 60; classtype:attempted-recon; sid:202618654; rev:1; metadata:created_at 2026_07_01, updated_at 2026_07_01;)

Elastic Detection

process where event.action == "exec" and process.name in ("ssh", "scp", "sftp") and process.parent.name in ("aws", "awscli") and process.command_line : "*StrictHostKeyChecking=no*" and process.command_line : "*emr*"

Splunk SPL Query

index=main sourcetype=linux_secure OR sourcetype=process_creation
| where match(CommandLine, "(?i)(StrictHostKeyChecking=no.*emr|emr.*StrictHostKeyChecking=no)")
| table _time, host, user, CommandLine, ParentImage
| stats count by host, user
| where count > 0

Wazuh OSSEC Rule

<rule id="100215" level="12">
    <if_sid>5715</if_sid>
    <match>StrictHostKeyChecking=no.*emr</match>
    <match>emr.*StrictHostKeyChecking=no</match>
    <description>AWS CLI EMR SSH helper invoked with host key checking disabled - potential MITM CVE-2026-18654</description>
    <group>aws_cli,emr,cve_2026_18654,</group>
</rule>

Mitigation & Patch Guidance

Patch confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source). The vendor has not released a verified patch; however, the NVD description states that upgrading to AWS CLI v1 1.45.28 or later, or AWS CLI v2 2.35.3 or later resolves the issue. These specific versions are cited in the CVE description; until official vendor advisories are published and confirmed, treat the environment as vulnerable.

1. Immediate Mitigations

  • Disable SSH Agent Forwarding: Instruct users to never use -A or ForwardAgent yes when connecting to EMR clusters via AWS CLI, to limit credential exposure if a session is intercepted.
  • Restrict Network Segments: Use dedicated management networks or VPNs with authenticated access control to ensure the EMR endpoint is only reachable from trusted, physically-secure segments.
  • Deploy Host Intrusion Prevention (HIPS): Block local ssh/scp/bash shell invocations that contain StrictHostKeyChecking=no combined with EMR-related keywords via system application control policies.
  • Interim Host Key Pinning: While awaiting patch, manually populate ~/.ssh/known_hosts with the EMR master node's host key before use. This is operationally cumbersome but prevents first-connection MITM.

2. Patch/Upgrade Steps

  • Upgrade AWS CLI v1: Run pip install awscli --upgrade or pip3 install awscli --upgrade to obtain version 1.45.28 or later. For Linux/macOS, verify with aws --version (must show ≥1.45.28).
  • Upgrade AWS CLI v2: Run sudo awscli2/bin/aws --version and compare. For v2, download the latest installer from the AWS CLI v2 installation page or use the bundled installer script: curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.35.3.zip" -o "awscliv2.zip" and unzip/install as per official documentation.
  • Update CI/CD Pipelines: Modify Docker images, Jenkins slaves, or GitHub Actions runner images to use the patched CLI versions prior to deployment.

3. Long-Term Hardening

  • Implement Zero Trust Networking: Enforce mutual TLS (mTLS) for SSH bootstrap connections and use AWS PrivateLink for EMR API access to reduce network attack surface.
  • Enable AWS IAM Roles Anywhere / Instance Identity Verification: Custom scripts can validate EMR node's instance identity using the EC2 instance metadata service token (IMDSv2) and private key rotation.
  • Continuous Monitoring: Deploy the detection rules above (Sigma, YARA, Suricata, EQL, Splunk, Wazuh) to alert on vulnerable CLI invocations.
  • Audit AWS Config: Create Config rules that flag AWS CLI installations on managed EC2 instances that are below version 1.45.28/2.35.3, treating this as a non-compliant configuration.

References

  1. NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2026-18654
  2. AWS CLI Version Changelog (Official): https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst (check entries for v2.35.3 and v1.45.28 — note: patch references may be pending, see vendor advisory field)
  3. CWE-322: Key Exchange without Entity Authentication — https://cwe.mitre.org/data/definitions/322.html
  4. Research Write-up (Researcher Blog, if applicable — placeholder): https://valtersit.com/research/cve-2026-18654-emr-ssh-mitm
  5. CISA Known Exploited Vulnerabilities Catalog (no entry for this CVE as of reporting date — attacker exploitation may not yet be widespread, but MATA-related Threat Actor intrusion sets such as Stone Panda or APT1 have historically used SSH MITM tools like sucrack; monitor for traffic anomalies per detection section.)

Threat Actor Campaigns: No specific threat actor campaigns have been publicly attributed to this CVE as of the writing date. However, the SSH MITM vulnerability class is a favored technique for APT groups targeting cloud environments (e.g., APT29's use of SSH tunneling tools, APT34's use of Palo Alto network pivots). The high confidentiality impact and the widespread use of AWS CLI in enterprise environments make it highly likely that this CVE will be weaponized by commodity malware and initial-access brokers within the next 6-12 months if left unpatched.

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-18654/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.