support.mikro.strouter help over vpn
since 2014 Contact us now

Router vulnerability note - MikroTik

MikroTik API: nothing stops you guessing, forever

What happened

CISA's advisory for this one says the quiet part in full: the RouterOS API does not meaningfully limit repeated failed authentication. There is a delay per connection in some versions, which a client can defeat simply by opening several connections at once. Nothing locks an account, because in RouterOS there is not much of an account state to lock.

The API is port 8728 and it is the door most automation uses. If it is bound to 0.0.0.0/0 — which is the default when you enable it and never think again — then the box is offering an unthrottled login prompt to the internet, and the only thing between that and someone's wordlist is the password you chose in 2021.

Who is affected

RouterOS with the API service enabled and unbounded, in the versions covered by ICSA-26-209-05.

Check it yourself

Who may use the API, and does it count attempts?

[admin@router] > /ip service print where name=api
 10  api      8728   0.0.0.0/0    yes
[admin@router] > /ip service print where name=api-ssl
 11  api-ssl  8729   0.0.0.0/0    yes
[admin@router] > /log print where message~"login failure"
 (empty log with a busy collector usually means the collector is fine)

Do this

  • Bind the API to the collector's address or an address list.
  • Prefer api-ssl with a client certificate where the tooling supports it.
  • Delete API users you created for a project that finished.
  • Treat the absence of lockout as a reason to have a long password rather than a short one.

How we handle it

For monitoring we would rather use the API over the tunnel with a read-only user than open a port to the world. If your collector is off-site, that is the discussion to have before the next alert.

Sources

Not your thing? We can run these checks for you over an OpenVPN tunnel: €45 fix visit, or just mail us.