Unauthenticated WebFig file disclosure 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-67281?

CVE-2026-67281 is a vulnerability classified as Access of Uninitialized Pointer and Improper Limitation of a Pathname to a Restricted Directory, affecting RouterOS (affected versions: 7.24 – < 7.24.2 and 7.20 – < 7.23.4). This vulnerability is rated High, with a CVSS score of 8.7. Public exploit code or evidence is available for this vulnerability, but that does not confirm exploitation in the wild.

Overview

Original source data

RouterOS WebFig contains an unauthenticated file-read vulnerability in the /jsproxy path where a newly allocated session retains a stale uninitialized principal pointer used for file authorization. An unauthenticated attacker can prepare the allocator so that the file-serving path dereferences this pointer with sufficient rights, then supply parent-directory components in an encrypted URI to escape the WebFig file namespace and disclose root-owned files, including configuration stores containing credentials.This issue affects only 7.x branch was fixed in versions: 7.23.4 (Long-term) and 7.24.2 (Stable)

Affected products and scope

  • MikroTik RouterOS branch 7.24: versions from 7.24 through less than 7.24.2 are affected; the identified fix is 7.24.2 on the Stable channel.
  • MikroTik RouterOS from 7.20 through less than 7.23.4: affected; the identified fix is 7.23.4 on the Long-term channel.
  • MikroTik states that RouterOS 6 is not affected by this WebFig issue. MikroTik also lists 7.25 beta 3 among releases containing the security fixes, but the structured affected ranges in the record cover only the two branches listed above.

Technical details

RouterOS WebFig creates a new session that can retain a stale, uninitialized principal pointer. The pointer is used for file authorization; by preparing the allocator state, an unauthenticated attacker can cause the file-serving path to dereference the pointer with sufficient rights. Parent-directory components in an encrypted URI can then be used to escape the WebFig file namespace and read root-owned files, including configuration stores containing credentials. The behavior combines access of an uninitialized pointer with improper pathname restriction, corresponding to CWE-824 and CWE-22. The affected component is WebFig, specifically the /jsproxy path; the available evidence does not establish the complete allocator preparation sequence or the full set of readable files.

Exploitability

The vulnerability is reachable over the network when an attacker can access the WebFig interface. The record describes no authentication and no user interaction; exploitation still requires preparing allocator state before the file-serving request. The record marks public exploit material as available, but this entry does not reproduce payloads or an exploitation sequence. CERT Polska confirmed real-world exploitation of a RouterOS attack chain, but its public notice does not attribute those observed attacks specifically to this WebFig file-read issue.

Technical impact

The flaw permits unauthorized reading of router data without authentication, including root-owned files and configuration stores that may contain credentials. The primary technical consequence is loss of confidentiality; the record does not identify direct integrity or availability impact for this issue. Exposed credentials may enable subsequent unauthorized access to the router or related systems, depending on which secrets are stored in the readable files. Actual organizational impact depends on whether WebFig was reachable by the attacker and what data the device stored.

Business impact

  • Configuration data and other root-owned files may be disclosed to an attacker without an account.
  • If the exposed files contain passwords, keys, or other secrets, the organization may need to rotate credentials and review systems that rely on them.
  • The risk is greatest for routers with WebFig exposed to the Internet or other untrusted networks. MikroTik states that its default configuration normally blocks the web interface from the Internet, but manually opened services and internal reachability can still create exposure.
  • The confirmed impact for this issue is confidentiality loss. The record does not identify direct data modification or service disruption as outcomes of this file-read flaw.

Remediation

  1. Upgrade the 7.24 branch to 7.24.2 Stable, or upgrade the branch from 7.20 through less than 7.23.4 to 7.23.4 Long-term. For beta or custom builds outside these ranges, verify the release notes for the exact channel before treating the device as fixed.
  2. If an upgrade cannot be applied immediately, restrict www and www-ssl in the IP services configuration to trusted management addresses, or disable WebFig when it is not needed. MikroTik recommends using a VPN for management access instead of exposing management ports directly.
  3. After upgrading, review the logs, the Flagged status in /system/device-mode/print, and any unrecognized configuration changes. The absence of the Flagged marker does not rule out an earlier compromise.
  4. If credentials or configuration data may have been disclosed, rotate affected passwords, keys, and other secrets after preserving the evidence needed for investigation.
  5. If compromise is suspected, isolate the device, preserve logs and configuration before resetting it, and rebuild from a trusted configuration. Do not blindly restore a full configuration backup that may have been compromised.

Detection

  • Inventory RouterOS 7 devices and identify their release branches, then determine whether WebFig is reachable from untrusted networks.
  • Confirm whether the device version falls within an affected range and review the www and www-ssl services in the IP services configuration.
  • After upgrading, review the logs for a critical compromise message and check the flagged value in the output of /system/device-mode/print. The absence of the marker does not prove that the device is safe.
  • Review users, scripts, scheduler tasks, and other configuration changes that are not recognized. Entries such as login failure for user -2 from <ip> via ssh, user <name> added by ssh:-2@<ip>, and a highly privileged ops account are indicators of the broader RouterOS attack chain, not unique indicators for this WebFig flaw.
  • If WebFig was exposed to untrusted networks or configuration stores may have been read, preserve logs and configuration for investigation and then address the affected credentials.
Sources (22)
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.