Skip to main content
Vulnerability Database/CVE-2026-112158

CVE-2026-112158: MikroTik RouterOS Integer Overflow RCE Flaw

CVE-2026-112158 is an integer overflow RCE vulnerability in MikroTik RouterOS that enables remote code execution through the ipt_SAME.ko module. This article covers the technical details, affected versions, and upgrade recommendations.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-112158 Overview

CVE-2026-112158 is an integer overflow vulnerability in MikroTik RouterOS versions up to 6.40.5, 6.44, and 7.20.8. The flaw resides in the same_check function of the ipt_SAME.ko kernel module, which handles iptables SAME target processing. An authenticated remote attacker with low privileges can trigger the overflow and cause availability loss, potentially bricking affected devices. MikroTik addressed the issue in RouterOS 7.21.5 and 7.23.1. The vulnerability is classified under CWE-189 (Numeric Errors).

Critical Impact

Remote exploitation of the integer overflow in ipt_SAME.ko can disrupt packet processing and render RouterOS devices unavailable, impacting network availability.

Affected Products

  • MikroTik RouterOS up to 6.40.5
  • MikroTik RouterOS up to 6.44
  • MikroTik RouterOS up to 7.20.8

Discovery Timeline

  • 2026-10-19 - CVE-2026-112158 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-112158

Vulnerability Analysis

The vulnerability affects the same_check function within the ipt_SAME.ko netfilter kernel module in MikroTik RouterOS. This module implements the iptables SAME target, which maps connections from the same client to the same source address across a range of IPs. The function performs arithmetic on IP range values without adequate bounds validation.

When crafted input is supplied, an integer overflow occurs during range calculation. The overflow corrupts kernel-level netfilter state and causes the device to crash or enter an unrecoverable state. Public reporting characterizes the outcome as a brick condition, meaning the device may require manual recovery.

The weakness falls under CWE-189, covering numeric errors including integer overflow and sign conversion flaws. EPSS data as of 2026-10-22 reports a probability of 0.334% at the 25.5 percentile.

Root Cause

The root cause is missing or insufficient validation of integer operands within same_check before arithmetic operations execute. The function does not enforce safe upper bounds on supplied range parameters, allowing wraparound that produces undersized allocations or invalid loop counts in subsequent kernel processing.

Attack Vector

The attack is launched over the network and requires low-level authenticated access to the router. No user interaction is needed. Successful exploitation does not disclose data or alter integrity but produces an availability impact on the targeted RouterOS instance.

No verified exploit code is available in public code examples. Technical details and a proof-of-concept description are referenced in the GitHub PoC for MikroTik CVE and VulDB CVE-2026-112158 Details.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-112158

Indicators of Compromise

  • Unexpected RouterOS device reboots or kernel panics correlated with inbound netfilter traffic.
  • Loss of management-plane availability on RouterOS devices running vulnerable 6.x or 7.x builds.
  • Authenticated API or Winbox sessions preceding device crash events in RouterOS logs.

Detection Strategies

  • Inventory all MikroTik devices and flag those running RouterOS versions at or below 6.40.5, 6.44, or 7.20.8.
  • Monitor syslog exports from RouterOS for repeated restart events or kernel module faults referencing ipt_SAME.
  • Correlate authentication logs with device availability metrics to identify low-privilege accounts triggering reboots.

Monitoring Recommendations

  • Forward RouterOS logs to a centralized SIEM for continuous availability monitoring and anomaly detection.
  • Alert on RouterOS uptime resets outside planned maintenance windows.
  • Track SNMP or ICMP reachability of RouterOS devices and open tickets automatically on repeated outages.

How to Mitigate CVE-2026-112158

Immediate Actions Required

  • Upgrade RouterOS to version 7.21.5 or 7.23.1 as recommended by the vendor.
  • Restrict management access to RouterOS devices to trusted administrative networks only.
  • Audit and remove unused low-privilege accounts that could be abused to reach the vulnerable code path.

Patch Information

MikroTik released fixed builds in RouterOS 7.21.5 and 7.23.1. Upgrade the affected component to one of these versions to remediate the integer overflow in ipt_SAME.ko. Refer to VulDB CVE-2026-112158 Details for additional vendor references.

Workarounds

  • Block untrusted network access to RouterOS management interfaces using firewall rules on upstream devices.
  • Enforce strong authentication and multi-factor controls on all RouterOS user accounts to reduce the authenticated attack surface.
  • Disable or avoid loading the ipt_SAME netfilter module where feasible until patches are applied.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.