CVE-2026-67279: MikroTik RouterOS SSH Rekey State Machine Workflow Bypass (MikroTrick Auth Bypass)
HERMES THREAT SCORE & PERIMETER INFRASTRUCTURE RISK
Target:MikroTik RouterOS - SSH Protocol State Machine (TCP Port 22) NVD CVSS v3.1 rates this flaw at 6.5 (Medium) on the premise of isolated file namespace operations. The Hermes Threat Score assigns 93 (CRITICAL), justified by confirmed in-the-wild exploitation cataloged in CISA KEV (added September 25, 2026). When chained with CVE-2026-86060 ('MikroTrick'), this SSH state machine bypass eliminates authentication requirements, permitting immediate unauthenticated root administrative takeover of boundary routers across telecommunications, ISP backbones, and enterprise networks.
CVE-2026-67279: MikroTik RouterOS SSH Rekey Workflow BypassVULNERABILITY
Network operating system developed by MikroTik providing routing, firewall, VPN, and bandwidth-testing services on edge and core network devices.
๐ Why is this related? (Evidence & Provenance)
“MikroTik Security Bulletin and CISA KEV catalog confirm CVE-2026-67279 affects RouterOS v6 and v7.”
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Improper neutralization of argument delimiters in MikroTik RouterOS SSH login path allows unauthenticated remote attackers to manipulate session policy masks and achieve full administrative control.
๐ Why is this related? (Evidence & Provenance)
“CERT Polska confirmed CVE-2026-67279 is chained directly with CVE-2026-86060 in the MikroTrick exploit chain.”
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in Microsoft Office & 365 Apps documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Cascading multi-stage attack chaining context injection, autonomous loop planning, and un-sandboxed execution sinks to achieve persistent root shell compromise on host machines.
๐ Why is this related? (Evidence & Provenance)
“CVE-2026-67279 weaponizes the agentic attack pattern formalized under AAP-007.”
- [technical_analysis]Pillar Security demonstrated that executing export BASH_ENV in Auto-Run causes bash to source hostile payloads upon subsequent commands. — Source: Pillar Security Research: Bypassing Cursor Auto-Run: When Shell Built-ins Lead to Host RCE (Reliability: HIGH)
1. Technical Context & Affected Software Matrix
Section titled โ1. Technical Context & Affected Software MatrixโMikroTik RouterOS is deployed worldwide across hundreds of thousands of network edge environments, fiber-to-the-home (FTTH) concentrators, WISP core routers, and industrial access devices.
| Parameter | Technical Specification | Operational Impact |
|---|---|---|
| CVE Identifier | CVE-2026-67279 | International tracking reference & CISA KEV entry |
| Attack Chain | MikroTrick (Chained with CVE-2026-86060) | Disclosed by CERT Polska / Exploited in the wild |
| Vendor / Platform | MikroTik / RouterOS (RouterBOARD & CHR x86_64) | Critical Perimeter Network Operating System |
| Vulnerable Component | SSH Transport Layer & State Machine (/nova/bin/sshd) | Protocol state machine handler |
| Flaw Type | CWE-841: Improper Enforcement of Behavioral Workflow | State machine phase confusion |
| Attack Vector | Network (Port 22/TCP) | Unauthenticated network access |
| Remediation Releases | 6.49.21 (Long-term), 7.23.4 (Long-term), 7.24.2 (Stable) | Mandatory upgrade required immediately |
2. In-Depth Technical Decomposition
Section titled โ2. In-Depth Technical DecompositionโSSH State Machine Violation
Section titled โSSH State Machine ViolationโRFC 4253 specifies that SSH transport key re-exchange can be initiated by either peer at any time by sending an SSH_MSG_KEXINIT packet. RFC 4252 specifies that the user authentication protocol (ssh-userauth) must run over the transport layer and must successfully complete before the connection protocol (ssh-connection, RFC 4254) can be opened.
In vulnerable MikroTik RouterOS releases, the SSH implementation maintains an internal finite state machine (FSM) tracking session progress:
State 0: TCP Handshake & Banner ExchangeState 1: Initial Key Exchange (KEX)State 2: User Authentication (ssh-userauth)State 3: Connection Protocol & Channel Multiplexing (ssh-connection)When a client initiates a rekey event while in State 2 by transmitting SSH_MSG_KEXINIT, the RouterOS SSH daemon suspends the authentication loop and re-enters the Diffie-Hellman / ECDH key exchange routines. Upon completion of the rekey sequence (SSH_MSG_NEWKEYS), the daemonโs state machine incorrectly transitions unconditionally to State 3 (Connection Protocol) rather than returning to the pending State 2 authentication context:
CLIENT ROUTEROS SSHD โ โ โโโโโโโโ TCP SYN / Handshake โโโโโโโโโโโโโบโ โโโโโโโโ SSH-2.0-MikroTik_v7.23.3 โโโโโโโโโ โ โ โ [1] Standard Diffie-Hellman Initial KEX โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ (State 1 -> State 2) โ โ โ [2] Enter User Authentication Protocol โ โ (NO VALID CREDENTIALS SUPPLIED) โ โ โ โ [3] MALICIOUS TRIGGER: Send Rekey โ โ SSH_MSG_KEXINIT โโโโโโโโโโโโโโโโโโโโบโ โ โ (State Machine Suspends Auth) โ [4] Complete Rekey Sequence โ โ SSH_MSG_NEWKEYS โโโโโโโโโโโโโโโโโโโโบโ โโโโโโ SSH_MSG_NEWKEYS โโโโโโโโโโโโโโโโโโโโ (BUG: Premature state promotion!) โ โ FSM enters State 3 (ACTIVE) โ [5] Channel Request Without Auth โ โ SSH_MSG_CHANNEL_OPEN ("session") โโโบโ Accepted! Channel allocated. โ โ โ [6] Command Execution โ โ SSH_MSG_CHANNEL_REQUEST ("exec") โโโบโ Dispatched without valid user! โผ โผChaining with CVE-2026-86060 (The โMikroTrickโ Exploit Chain)
Section titled โChaining with CVE-2026-86060 (The โMikroTrickโ Exploit Chain)โBy itself, CVE-2026-67279 runs the dispatched exec request within an unauthenticated fallback context that allows writing and manipulating files within /nova/etc/ or the RouterOS file namespace. However, threat actors chain this capability directly with CVE-2026-86060:
- Step 1 (CVE-2026-67279): The attacker triggers the rekey state machine bypass, opening an interactive session channel without having authenticated.
- Step 2 (CVE-2026-86060): The attacker passes an argument delimiter injection in the username parameter during the session open channel request (e.g.,
-2or crafted sub-arguments). - Step 3 (Full RCE): The internal session handler parses the injected argument delimiter as administrative flags, coercing the permission bitmask into
policy=alland spawning an unauthenticated administrative CLI session or backdoor user (/user add name=ops group=full).
This composite weaponization matches the systemic risks analyzed in AAP-007: Autonomous Cascading Remote Code Execution.
3. Forensic Execution Flow & Telemetry
Section titled โ3. Forensic Execution Flow & TelemetryโAttack Execution Timeline
Section titled โAttack Execution Timelineโ[T0:00.000] Inbound connection on TCP/22 from untrusted IP.[T0:00.120] Initial SSH handshake and key exchange complete.[T0:00.180] Client requests ssh-userauth service, but submits no valid credentials.[T0:00.220] Client immediately emits SSH_MSG_KEXINIT (rekey request).[T0:00.310] SSH_MSG_NEWKEYS exchanged; SSH daemon FSM incorrectly sets authenticated=true.[T0:00.340] Client transmits SSH_MSG_CHANNEL_OPEN for "session".[T0:00.360] Client transmits SSH_MSG_CHANNEL_REQUEST with "exec" or chained "-2" injection.[T0:00.410] Unauthorized user account created or configuration file extracted.Log Analysis & Artifacts
Section titled โLog Analysis & ArtifactsโInspect RouterOS device logs using /log print detail:
# Check for unauthenticated session anomalies and sudden user additions/log print where message~"user" or message~"ssh" or message~"login"Look for:
- SSH connections followed immediately by
logged inwithout an associated successfulpassword for user ... acceptedlog line. - Creation of unexpected users such as
ops,backup,devel, or randomly generated strings in/user print. - Creation of unknown scheduled scripts in
/system script printand/system scheduler print. - File creation in
/file printwith extensions.rsc,.backup, or.auto.rsc.
4. Detection Engineering
Section titled โ4. Detection EngineeringโSigma Detection Rule
Section titled โSigma Detection Ruleโtitle: MikroTik SSH Rekey Before Authentication Attempt (CVE-2026-67279)id: 67279e01-mikrotik-ssh-rekey-bypassstatus: stabledescription: Detects an SSH client initiating key renegotiation (SSH_MSG_KEXINIT) immediately following transport setup without completing user authentication on MikroTik devices.references: - https://cert.pl/en/posts/2026/09/mikrotrick/ - https://cve.org/CVERecord?id=CVE-2026-67279author: Hermes Codex Detection Engineeringdate: 2026-09-26logsource: category: network service: sshdetection: selection: destination_port: 22 client_kex_count|gt: 1 auth_success: false channel_open: true condition: selectionlevel: criticaltags: - attack.initial_access - attack.t1190 - cve.2026-67279 - cve.2026-86060# Automated integrity audit command for MikroTik RouterOS:if ([:len [/user find group=full]] > 1) do={ :log warning "HERMES-AUDIT: Multiple full-privilege administrative accounts detected!"}/file print where name~".rsc" or name~".backup"/system scheduler print detail5. Remediation & Hardening Playbook
Section titled โ5. Remediation & Hardening Playbookโ- Immediate Firmware Upgrade: Upgrade all MikroTik routers to
7.24.2(Stable),7.23.4(Long-term), or6.49.21(v6 Long-term). - Restrict Management Services: Disable WAN access to SSH (
/ip service set ssh address=10.0.0.0/8,192.168.0.0/16). Do not expose TCP/22 directly to the public internet. - Audit User Accounts & Keys: Execute
/user printand/user ssh-keys printto verify no unauthorized administrative accounts or backdoor public keys have been injected. - Inspect Scheduler & Startup Scripts: Check
/system script printand/system scheduler printfor persistent malicious reverse shells or proxy configurations. - Verify Firewall Drop Rules: Enforce explicit drop rules for untrusted incoming traffic on management interfaces.
6. Corroborative References
Section titled โ6. Corroborative Referencesโ- CISA Known Exploited Vulnerabilities Catalog
- CERT Polska Advisory: MikroTrick Exploit Chain
- MikroTik Security Advisory September 2026
- Hermes Analysis: CVE-2026-86060 MikroTik Argument Injection
- Hermes Analysis: CVE-2026-67277 MikroTik Kernel Memory Disclosure
- Hermes Analysis: CVE-2026-7273 Zyxel Switch Buffer Overflow
- Agentic Attack Pattern: AAP-007 Autonomous Cascading RCE