Router vulnerability note - MikroTik
MikroTik SMB in 2026: still a length field, still a heap
What happened
The userspace SMB daemon in RouterOS takes the password length out of an SMB1 SessionSetupAndX request
and uses it in a memory copy. Give it a uniPwdLen value that underflows and the copy length becomes
much larger than the heap buffer, so adjacent heap memory gets written with whatever followed. That is CVE-2018-7445
and CVE-2020-11881 dressed in a different field, eight years on.
We have said it twice already on this page and we will keep saying it: the cheapest fix for a service nobody uses is a disabled service. SMB is on by default in some RouterOS configurations, and the number of customers who can tell us what mounts their router as a share is small.
Who is affected
RouterOS before 7.24 with the SMB service enabled.
Check it yourself
One command, either outcome is fine
[admin@router] > /ip service print where name=smb # NAME PORT ADDRESS VALID 8 smb 445 0.0.0.0/0 yes [admin@router] > /ip service set smb disabled=yes (this is the whole remedy for most people)
Do this
- Disable SMB unless a device genuinely needs it.
- Upgrade to 7.24 or newer if you must keep it.
- If you keep it, bind it to a LAN address list rather than the world.
- Put the service list in the audit report so nobody re-enables it in 2029 'to test something'.
How we handle it
Service hygiene is a ten-minute change and it retires a category of bugs rather than one CVE. It is the first thing we do on an unmanaged RouterOS box.