Integer overflow in MikroTik RouterOS ipt_SAME module

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-112158?

CVE-2026-112158 is a vulnerability classified as Integer Overflow or Wraparound and Numeric Errors, affecting RouterOS (affected versions: 6.0, 6.1, and other affected versions). This vulnerability is rated High, with a CVSS score of 7.1. Current sources do not report this vulnerability as exploited.

Overview

Original source data

A weakness has been identified in MikroTik RouterOS up to 6.40.5/6.44/7.20.8. Impacted is the function same_check of the file ipt_SAME.ko. Executing a manipulation can lead to integer overflow. The attack may be launched remotely. Upgrading to version 7.21.5 and 7.23.1 is recommended to address this issue. You should upgrade the affected component.

Affected products and scope

MikroTik RouterOS versions 6.0 through 6.19, as well as the 7.x line up to 7.20.8, are affected. The description groups the affected range as up to 6.40.5/6.44/7.20.8. Versions 7.21.5 and 7.23.1 and later contain the fix. Deployments running these versions with the ipt_SAME module loaded are in scope; systems that have never loaded the module or that run a patched version are not affected.

Technical details

The weakness is an integer overflow (CWE-190) in the same_check function inside the ipt_SAME.ko kernel module. ipt_SAME.ko is a loadable kernel module that implements packet-filtering logic. The description does not specify the exact crafted input or the arithmetic operation that overflows, so the precise trigger remains undocumented in public records. What is established is that a value processed by same_check exceeds the range of its integer type, producing an out-of-range result that the surrounding code does not handle safely, leading to a crash or hang.

Exploitability

The attack vector is network-based, requiring low-level authentication (typically a logged-in user with limited, non-administrative privileges). No user interaction is needed beyond the initial authenticated session. Attack complexity is low. No public exploit code is known, and there is no report of exploitation in the wild. The vulnerability has been assessed as low in likelihood of exploitation.

Technical impact

An attacker who can reach the vulnerable function can cause the router to lose availability. The CVSS data shows no impact on confidentiality or integrity: no data is read, written, or exfiltrated, and the routing table or configuration is not modified. The consequence is bounded to the router stopping or becoming unresponsive until it is rebooted or recovers.

Business impact

For any organisation running MikroTik RouterOS on a network path, a crash or unresponsive state in the router translates directly into loss of connectivity for every device behind it. This includes ISPs, enterprise edge deployments, and any site where RouterOS is the primary or upstream gateway. The impact is purely availability: no customer data is read or altered, so regulatory exposure is limited to service-level agreements and uptime commitments. Network operations and incident response teams should be the primary owners of the fix, with service desk awareness that a sudden connectivity drop on an unpatched RouterOS box could be the symptom.

Remediation

Upgrade to MikroTik RouterOS 7.21.5 or 7.23.1 or later. For devices that cannot be immediately upgraded, restricting remote access to the packet-filtering configuration to fully trusted administrators reduces the attack surface, though this is a mitigation and not a fix. A reboot after a crash will restore availability but does not prevent recurrence.

Detection

Watch for unexplained reboots or unresponsive states on RouterOS devices, particularly if they occur shortly after an authenticated session modifies firewall or packet-filtering rules. Review system logs for kernel panics or module crashes referencing ipt_SAME.ko. Check whether the ipt_SAME module is loaded on devices that do not require the SAME target in their ruleset; an unused loaded module is unnecessary exposure.

Sources (10)
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.