Skip to content

CVE-2026-67279: MikroTik RouterOS SSH Rekey State Machine Workflow Bypass (MikroTrick Auth Bypass)

Density:
HERMES

HERMES THREAT SCORE & PERIMETER INFRASTRUCTURE RISK

Target: MikroTik RouterOS - SSH Protocol State Machine (TCP Port 22)
Confidence: 99%
93 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 19 / 20
Weaponization 19 / 20
Exposure 20 / 20
Prevalence 18 / 20
Impact 18 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

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.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-67279: MikroTik RouterOS SSH Rekey Workflow BypassVULNERABILITY

Connected Nodes: 4
Active Relationships (Outgoing)
→ affectsPRODUCTMikroTik RouterOS
99% VERY_HIGH

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.”

Supporting Verified Evidence:

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.”

Supporting Verified Evidence:
→ affectsPRODUCTMicrosoft Office & 365 Apps
98% 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.”

Supporting Verified Evidence:
→ exploitsAGENTIC ATTACK_PATTERNAAP-007: Autonomous Cascading RCE
92% 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.”

Supporting Verified Evidence:

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.

ParameterTechnical SpecificationOperational Impact
CVE IdentifierCVE-2026-67279International tracking reference & CISA KEV entry
Attack ChainMikroTrick (Chained with CVE-2026-86060)Disclosed by CERT Polska / Exploited in the wild
Vendor / PlatformMikroTik / RouterOS (RouterBOARD & CHR x86_64)Critical Perimeter Network Operating System
Vulnerable ComponentSSH Transport Layer & State Machine (/nova/bin/sshd)Protocol state machine handler
Flaw TypeCWE-841: Improper Enforcement of Behavioral WorkflowState machine phase confusion
Attack VectorNetwork (Port 22/TCP)Unauthenticated network access
Remediation Releases6.49.21 (Long-term), 7.23.4 (Long-term), 7.24.2 (Stable)Mandatory upgrade required immediately

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 Exchange
State 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:

  1. Step 1 (CVE-2026-67279): The attacker triggers the rekey state machine bypass, opening an interactive session channel without having authenticated.
  2. Step 2 (CVE-2026-86060): The attacker passes an argument delimiter injection in the username parameter during the session open channel request (e.g., -2 or crafted sub-arguments).
  3. Step 3 (Full RCE): The internal session handler parses the injected argument delimiter as administrative flags, coercing the permission bitmask into policy=all and 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.


[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.

Inspect RouterOS device logs using /log print detail:

Terminal window
# 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 in without an associated successful password for user ... accepted log 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 print and /system scheduler print.
  • File creation in /file print with extensions .rsc, .backup, or .auto.rsc.

title: MikroTik SSH Rekey Before Authentication Attempt (CVE-2026-67279)
id: 67279e01-mikrotik-ssh-rekey-bypass
status: stable
description: 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-67279
author: Hermes Codex Detection Engineering
date: 2026-09-26
logsource:
category: network
service: ssh
detection:
selection:
destination_port: 22
client_kex_count|gt: 1
auth_success: false
channel_open: true
condition: selection
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026-67279
- cve.2026-86060

  1. Immediate Firmware Upgrade: Upgrade all MikroTik routers to 7.24.2 (Stable), 7.23.4 (Long-term), or 6.49.21 (v6 Long-term).
  2. 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.
  3. Audit User Accounts & Keys: Execute /user print and /user ssh-keys print to verify no unauthorized administrative accounts or backdoor public keys have been injected.
  4. Inspect Scheduler & Startup Scripts: Check /system script print and /system scheduler print for persistent malicious reverse shells or proxy configurations.
  5. Verify Firewall Drop Rules: Enforce explicit drop rules for untrusted incoming traffic on management interfaces.