The Arithmetic Behind MikroTik’s Latest Critical Flaw

Illustrative 32-bit unsigned arithmetic: 16 minus 32 wraps to 4,294,967,280 instead of minus 16. This is not recovered RouterOS code.
In this Field Note
  1. How a subtraction gets out of hand
  2. The management address is only the beginning
  3. The branch problem
  4. What has actually been exploited
  5. Why the findings are arriving together
  6. A maintenance window with an end to it

A web request can reach vulnerable RouterOS code before a password is checked.

Among the changes listed in MikroTik's October 1 software release was a familiar, uninformative line: system - improve stability. An administrator on the company's forum asked for CVE numbers and an explanation of the impact. Release discussion

Two days earlier, CISA had disclosed CVE-2026-84411, a flaw that could let a stranger take control of a RouterOS device by sending a single web request. The attacker would need access to the web-management service, but no account. The resulting code could run as root.

The release discussion does not establish that 7.24.5 first fixed this bug. CISA puts the affected range below 7.24. Later releases contain other security fixes.

Disable unused web-management services on affected devices, or restrict them at the firewall to required management sources. Check dependencies and another working administration path first.

How a subtraction gets out of hand

The flaw is an integer underflow in HTTP request-body handling. CISA says this processing is reachable before authentication and can lead to root code execution or denial of service. It does not publish the faulty function or a complete exploit.

Imagine a parser keeping two counts: the amount of data it expects and the amount it has processed. To calculate what remains, it subtracts one from the other:

remaining = declared_length - already_processed

Now give those counts the values 16 and 32, stored as 32-bit unsigned integers. The mathematical answer is minus 16. The unsigned result, which cannot represent a negative number, wraps to 4,294,967,280.

A copying routine might use that wrapped result as a length. Another part of the parser might add it to a pointer, or allocate one amount of memory while a later operation assumes another. The exact consequences depend on how the value travels through the program. A failed memory access may end in a crash; a useful corruption of program state can give an attacker a route to code execution. MITRE's underflow reference

In the example, the parser should have rejected the impossible relationship between its counts before subtracting. It also needs to ensure that the eventual operation fits its buffer. Bodies can arrive in pieces; a parser carries state between reads; values may change type as they pass between routines. The HTTP specification explicitly warns about integer conversion errors in handling large chunk sizes.

The numbers and variable names above are illustrative, and the reference to chunk sizes is not evidence that chunked encoding is the trigger. Architecture, memory layout, and exploit mitigations would help determine how an actual exploit proceeds. No independent reproduction was performed for this article.

Because the vulnerable processing precedes authentication, password strength does not block this attack path. HTTPS decrypts the request before passing it to the HTTP parser.

CISA describes one crafted request, which TCP may deliver in several packets. A packet-by-packet search that never reconstructs the request could miss the relationship between its parts.

The management address is only the beginning

RouterOS names its HTTP and HTTPS services www and www-ssl. The usual ports are 80 and 443, although an administrator can change them. Look at the running service configuration before deciding what to test. WebFig is the conspicuous dependency; REST automation and other web functions may also be using the service. MikroTik's service documentation

An outside-in scan is useful, but a WISP's subscriber can be on the wrong side of an otherwise satisfactory WAN filter. So can a guest or compromised workstation on a business network. A private address on a management VLAN does not, by itself, prevent any of those machines from routing to it.

Traffic addressed to the router passes through the IP firewall's input chain. Rules in forward govern traffic passing through to somewhere else. A configuration can therefore protect the customers behind a router while leaving the router's own web service reachable. IPv6 requires its own attention, as do alternate WAN paths and support tunnels. RouterOS packet flow

MikroTik says excluded clients can establish a TCP connection before the service refuses them; the vendor recommends firewall filtering for untrusted networks. We do not have a published analysis establishing whether that service-level refusal precedes the vulnerable operation in this CVE. Use the input firewall to block untrusted sources before they reach the service.

A source network reaches the router input firewall, then web-service request handling, then authentication. Filter unwanted management connections before the vulnerable request processing.
Logical access path for traffic addressed to the router. This is a simplified control diagram, not a reconstruction of the unpublished exploit. Sources: MikroTik packet flow and CISA.

Then test from an excluded network. Getting back in from the administrator's laptop proves only half of what the change was meant to accomplish.

The branch problem

CISA recommends upgrading to 7.24 or later. As of October 2, 7.24.5 is the current stable release.

The web advisory does not name separate fixed builds for RouterOS 6 or 7.23 long-term. September's patch numbers concern separate vulnerabilities:

Finding Published fix information
CVE-2026-84411, HTTP request-body underflow CISA lists versions below 7.24 as affected and recommends 7.24 or later.
MikroTrick SSH chain, CVE-2026-67279 and CVE-2026-86060 Fixes shipped in 7.24.2, 7.23.4, and 6.49.21, as applicable to the branch.
CVE-2026-67278, RSA-signature verification An incomplete v7 fix was followed by completed fixes in 7.24.3 and 7.23.6.

The September information comes from MikroTik's security bulletin and CERT Polska's disclosures.

If an older branch is a requirement, ask MikroTik specifically about CVE-2026-84411. In the meantime, contain the web-management exposure. An improvised v6-to-v7 migration across a remote fleet introduces its own ways to spend the weekend at work.

What has actually been exploited

As of October 2, CISA says no known public exploitation specifically targeting the web flaw has been reported to the agency. Undetected or unreported attacks remain possible. There is no validated detection signature in the advisory. CISA advisory

CERT Polska confirmed exploitation of the September SSH flaws, and its later reconstruction identified the MikroTrick chain as CVE-2026-67279 plus CVE-2026-86060. Rekeying could move an unauthenticated SSH connection into channel handling. A second flaw in the login helper allowed attacker-controlled input to influence privileges. The RSA-key impersonation vulnerability disclosed around the same time was a separate issue. September 22 technical analysis

An SSH intrusion doesn't establish use of the HTTP flaw, and a web-service crash doesn't prove code execution. A listening service alone tells us neither its version nor whether it has been compromised.

Why the findings are arriving together

CERT Polska describes using LLM agents in an isolated RouterOS lab covering 24 releases. Agents analyzed binaries and tested unusual protocol sequences, including repeated or reordered stages. Researchers validated findings with repeatable experiments, negative tests, and comparisons between versions. Research account

Testing a protocol sequence across releases requires preparing each machine, running the exchange, collecting evidence, restoring state, and changing one condition at a time. Automating that work lets researchers pursue more questions, including sequences a normal client would never send.

CISA credits an anonymous researcher for the web flaw and gives no account of the discovery method. The cited reporting also does not establish what tools the attackers used.

RouterOS's services have accumulated over years, and neighboring code may share assumptions or helper routines. Concentrated research can produce simultaneous disclosures of defects introduced years apart.

Nick Pratley's independent analysis of September's RouterOS changes shows how comparing packages can reveal which routines changed. His early reconstruction had missing prerequisites and did not establish a complete attack.

Administrators need the affected service, a branch-specific fix, and enough mitigation detail to make a decision before deployment. A line about stability is of little use for that job.

A maintenance window with an end to it

Collect the running version, device role, services, and management paths, including CHR and managed customer equipment. Establish recovery access. These commands are read-only:

/system resource print
/system package print
/ip service print detail
/ip firewall filter print detail
/ipv6 firewall filter print detail

Follow firewall rule order, interface lists, and upstream controls. Keep exports private. If web services are unnecessary and another protected administration path works, disable them:

/ip service disable www
/ip service disable www-ssl

Check REST and other dependencies first. These commands can disconnect your browser and web automation; run them through the alternative management path with recovery available. Otherwise, restrict the input firewall to necessary management sources and test excluded paths. Service command reference

For remote access, use a maintained VPN with narrow permissions, keeping SSH and WinBox behind that boundary too. MikroTik's hardening guidance

Save a readable export and recovery backup off the device. Obtain packages from MikroTik through a trusted system; check package requirements, free space, and power. Test representative hardware before deploying in manageable groups. Our firmware deployment note covers that preparation.

After reboot, read back the loaded version. Check routing, subscriber sessions, queues, VLANs, VPNs, DNS and DHCP as the device's role requires. Verify monitoring and backups, and retest management reachability. Track contained, unreachable, and deferred devices separately from verified upgrades.

Root code execution could expose credentials, allow traffic-policy changes, or establish further access, below the configuration interface an administrator normally uses. Compromise won't automatically decrypt protected application traffic; redirection, disruption, and access to metadata remain concerns.

Compare users, keys, scripts, scheduler entries, DNS, firewall and NAT rules, tunnels, proxy settings, and files against a trusted baseline. Consult off-device logs and configuration history.

Where supported, check /system device-mode print. Flagged detects and disables selected suspicious configuration. Investigate before clearing it. Absence of a flag doesn't establish integrity or exclude this HTTP attack. Device-mode documentation

A pre-authentication attack may leave no failed-password entry or recorded request body. Unexpected restarts and outbound connections merit investigation, but don't identify this CVE by themselves.

If the evidence points to compromise, contain the device and preserve useful evidence before destructive recovery. Coordinate continuity with the operational owner, especially where losing communications affects physical processes. A Netinstall rebuild erases configuration and user files; follow it with a reviewed configuration and rotation of exposed secrets from a trusted system. Restoring a suspect backup wholesale can restore the intruder's access. For CHR, use a trusted image and review the surrounding virtualization access.

Record the running release, tested management paths, and whether earlier compromise was investigated or remains unresolved.

Share this article

LinkedInFacebookXEmail

Field discussion

What would you test next?

Ask a question, challenge an assumption, or share a lesson from the field. Keep customer names, live addresses, credentials, and sensitive network details out of public comments. Charles reviews every comment before it appears. See the privacy notice for how comment information is handled.

Join the discussion

Your comment will appear after Charles reviews it. Required fields are marked .

A pseudonym is fine.

Working through a similar problem?

Describe the network, the difficulty, and the outcome you need. Charles reviews the brief and helps establish the right scope.