Unauthenticated SSH command execution and file manipulation in MikroTik RouterOS

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-67279?

CVE-2026-67279 is a vulnerability classified as Improper Enforcement of Behavioral Workflow, affecting RouterOS (affected versions: 7.24 – < 7.24.2, 7.0.0 – < 7.23.4, and other affected versions). This vulnerability is rated Medium, with a CVSS score of 6.9. This vulnerability has been observed being exploited in the wild.

Overview

Original source data

RouterOS SSH enters the connection protocol after a client-requested rekey even though user authentication was never attempted, allowing an unauthenticated client to open a session channel and send an exec request. On affected builds the server dispatches the command, enabling unauthenticated creation, overwrite, and reconstruction of files in the RouterOS managed file namespace, including support files containing configuration and diagnostic data.This issue was fixed in versions: 6.49.21 (Long-term), 7.23.4 (Long-term) and 7.24.2 (Stable)

Affected products and scope

  • RouterOS in the 7.24 branch, from 7.24 to less than 7.24.2, is affected; the identified fix is 7.24.2 Stable.
  • RouterOS from 7.0.0 to less than 7.23.4 is affected; the identified fix is 7.23.4 Long-term.
  • RouterOS from 6.0.0 to less than 6.49.21 is affected; the identified fix is 6.49.21 Long-term.
  • The supplied product data marks the default status as unaffected outside these ranges. Branches not covered by the record have not been independently assessed in this entry.

Technical details

MikroTik RouterOS is expected to keep an SSH connection in the transport or user-authentication phase until the server accepts user authentication. The defect is improper enforcement of this behavioral workflow (CWE-841): after an attacker-controlled rekey request completes, the server advances to connection and channel handling even though no authentication was attempted.

The high-level sequence is:

  1. A client reaches the RouterOS SSH service and negotiates an encrypted connection.
  2. Before user authentication, the client requests a rekey.
  3. On an affected build, the post-rekey state is treated as if channel handling were permitted.
  4. The client opens a session channel and sends an exec request; the server dispatches the command and exposes file operations in the RouterOS managed file namespace.

The attacker-controlled input is the SSH protocol exchange, not a valid password, key, or authenticated username. Public evidence identifies the state transition and resulting file operations, but does not identify a lower-level function or parser defect beyond the workflow error.

Exploitability

Reachability is network based: the attacker must be able to connect to the RouterOS SSH service. The attack characteristics in the record and CERT Polska's analysis support no required credentials, no completed authentication, no user interaction, and low attack complexity. Public research has reproduced the pre-authentication state transition and published a non-invasive differential check. CERT Polska confirmed active exploitation of an attack chain using this bypass together with a separate SSH weakness against devices with SSH exposed to public networks; that evidence does not prove that every incident used this flaw in isolation.

Technical impact

Successful exploitation on an affected device can provide unauthenticated command dispatch and unauthorized creation, overwrite, or reconstruction of files in the managed file namespace. Support files may contain configuration and diagnostic data, so alteration or reconstruction can undermine configuration integrity and incident-response evidence. CERT Polska and independent research show that this bypass can serve as the first stage of a separate SSH attack chain that reached full administrative control on some vulnerable RouterOS builds; that privilege outcome is not established from this flaw alone. The supplied evidence does not establish cross-device impact or a direct denial-of-service effect.

Business impact

An unauthenticated remote party can modify the RouterOS managed file namespace without first obtaining a valid user identity. This can affect the integrity of configuration and diagnostic support files and may leave administrators working from altered or reconstructed evidence. CERT Polska reports that this bypass was used with a separate SSH weakness in observed attacks that achieved full administrative control, but that broader result is the impact of a chained attack. The supplied evidence does not establish a direct availability impact from this flaw alone.

Remediation

  1. Upgrade an affected device to the corresponding fixed release for its branch: 7.24.2 Stable for the 7.24 branch, 7.23.4 Long-term for the 7.0.0 through less than 7.23.4 branch range, or 6.49.21 Long-term for the 6.0.0 through less than 6.49.21 branch range.
  2. Restrict SSH to trusted management networks or disable it when it is not required. MikroTik recommends not exposing management ports to untrusted networks and using a VPN for administrative access.
  3. If an update cannot be installed immediately, block SSH access from all addresses outside trusted management networks or disable the SSH service. This is a temporary attack-surface reduction and does not replace installing the fixed release.
  4. After updating, review logs, the flagged status where supported, users, scripts, scheduler tasks, proxy servers, tunnels, and other unrecognized configuration changes.
  5. If compromise is suspected, isolate the device and preserve logs and configuration before resetting it, restore from a trusted and verified configuration, and rotate related passwords, keys, and secrets. Do not blindly restore a full configuration backup created on a potentially compromised device.

Detection

  • Inventory RouterOS versions and SSH exposure, then compare them with the affected branches in affected_summary.
  • Review RouterOS logs for patterns reported by CERT Polska in the observed attack chain, including login failure for user -2 from <ip> via ssh and user <name> added by ssh:-2@<ip>. These are observed chain indicators, not required signatures for every exploitation attempt.
  • Check for a highly privileged user named ops, as well as unrecognized users, scripts, scheduler tasks, proxy servers, tunnels, and other configuration changes.
  • On devices that support the mechanism, check the compromise message in the log and the flagged value with /system/device-mode/print. Absence of the marker does not prove that the device is safe.
  • Investigate network activity involving 82.192.72.4 and 103.102.31.18; CERT Polska described the first address in observed successful attacks and the second in exploitation attempts.
  • A non-invasive SSH differential check can compare channel opening before and after rekey without sending a username, authentication attempt, or command. A channel that opens only after rekey is consistent with the affected behavior; timeouts or unmatched results remain inconclusive.
Sources (26)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.