MikroTik RouterOS Stack-Based Buffer Overflow Vulnerability (CVE-2018-7445)
Published In CISA KEV since Sources: CVE.org
What is affected, what to do
A stack-based buffer overflow in MikroTik RouterOS allows an attacker to execute remote code on the system before authentication. This vulnerability affects all architectures and devices running RouterOS versions prior to 6.41.3/6.42rc27. It is actively exploited in the wild, particularly in ransomware campaigns since 2022. Organizations should urgently update to the patched versions to mitigate the risk.
The vulnerability is being actively exploited; treat it as a priority. Update MikroTik RouterOS to version 6.41.3. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- MikroTik RouterOS
lt *..6.41.3 - MikroTik RouterOS
eq 6.42..6.42
- MikroTik RouterOS
- Fixed in
- MikroTik RouterOS
6.41.3
- MikroTik RouterOS
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
9.8
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: NVD, CVSS v3
9.8
CVSS v3
Severity Critical on the scale from 0 to 10.
Source: CVE.org
65.8 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.27
Show all metrics
- Severity
- Critical
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 227.84 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- actively exploited
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 9.8 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 9.8
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 65.8 %
- High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 99.27
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- Actively exploited
- Published
In CISA KEV since
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- CISA assessment (SSVC)
- Exploitation: active · automatable · Technical impact: total
- Source: CISA Vulnrichment, as of 7 February 2025
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-119
Response and mitigation
Why act now?
Prioritisation rationale
This is a pre-authentication, network-reachable, low-complexity flaw that yields full code execution on the router; public proof-of-concept exploits have been available for years and the exploitation likelihood ranks among the very highest of all tracked CVEs. MikroTik devices are a long-standing favourite for botnet operators, proxy-network builders and cryptomining injection, with typical victims being branch networks, SME perimeters and forgotten legacy boxes running outdated firmware. Because SMB is disabled by default, the critical risk concentrates on devices where it was switched on — but on those, especially if reachable from the internet, treat this as an emergency fix; a compromised perimeter router is a reportable-grade incident for NIS2/KRITIS-scoped organisations.
Runbook step 1
Immediate response (0-24 h)
- Inventory: Enumerate every MikroTik RouterOS device (including CHR instances and branch-office routers) and record the version:
/system resource print. Anything below 6.41.3 (or 6.42 pre-releases before 6.42rc27) is vulnerable, regardless of architecture or hardware model. - Disable the SMB service now unless it is genuinely required:
/ip smb set enabled=no, verify with/ip smb print. With SMB off, the vulnerable code path is unreachable. - Patch: Upgrade to RouterOS 6.41.3 or later, ideally the current stable or long-term branch (check the MikroTik changelog for the exact version). Follow up with a RouterBOOT firmware upgrade (
/system routerboard upgrade) and reboot. - Validate exposure: Run an external scan to confirm whether TCP 139/445 is reachable on router WAN addresses; close any hits immediately with a firewall rule (see below).
- If compromise is suspected: Treat the device as untrusted — export and preserve the config (
/export file=forensics), Netinstall from a clean image, rebuild the config from a reviewed baseline, and rotate all local user passwords, VPN keys (IPsec PSKs, WireGuard, L2TP secrets) and RADIUS shared secrets.
- Inventory: Enumerate every MikroTik RouterOS device (including CHR instances and branch-office routers) and record the version:
Runbook step 2
Mitigation layers
- Network segmentation: Allow SMB/NetBIOS to router management planes only from a dedicated management VLAN. Drop inbound TCP 139/445 from the internet at the perimeter as a blanket rule.
- RouterOS local firewall (input chain):
/ip firewall filter add chain=input protocol=tcp dst-port=139,445 in-interface-list=WAN action=drop comment="CVE-2018-7445"— place it above any accept rules. Also blockudp dst-port=137,138. - Service binding: If SMB is a business requirement, restrict it with
/ip smb set interfaces=<LAN-bridge>and setallow-guests=no. - IPS layer: Enable Suricata/Snort signatures for CVE-2018-7445 (verify your ET Open/Talos rulesets are current); generically alert on NetBIOS session requests (type
0x81) with oversized or malformed called/calling names destined for router IPs. - Management-plane hardening: Disable unused services (
/ip service disable telnet,ftp,www,api), restrict Winbox (TCP 8291) and SSH to the management network viaaddress=, rename or remove the defaultadminaccount.
Runbook step 3
Detection rules
- Network telemetry (Zeek): Flag
conn.logentries withid.resp_p in {139, 445}where the responder is a known router and the originator is outside the management range. SPL sketch:index=zeek sourcetype=conn id.resp_p IN (139,445) id.resp_h IN (<router_ips>) NOT id.orig_h IN (<mgmt_net>). - Suricata rule shape:
alert tcp any any -> $ROUTER_NET 139 (msg:"Possible CVE-2018-7445 NetBIOS session request overflow"; flow:to_server,established; content:"|81|"; depth:1; dsize:>200; sid:<local>;)— tune the size threshold to your environment. - RouterOS logs (forwarded via syslog): Entries such as "router was rebooted without proper shutdown" or SMB process crash/restart events, especially when time-correlated with inbound TCP 139 sessions.
- Post-exploitation indicators: Unexpected entries in
/user print,/system scheduler print,/system script print;/ip proxyor/ip sockssuddenly enabled; altered DNS servers (/ip dns print); new NAT/filter rules or packet-sniffer/traffic-flow targets. Automate config diffs against a known-good baseline (e.g. Oxidized/RANCID). - Router-originated egress: Watch NetFlow/Zeek for new outbound connections initiated by the routers themselves to unfamiliar destinations (tunnels, proxy relays, mining pools).
- Network telemetry (Zeek): Flag
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
Description
A buffer overflow was found in the MikroTik RouterOS SMB service when processing NetBIOS session request messages. Remote attackers with access to the service can exploit this vulnerability and gain code execution on the system. The overflow occurs before authentication takes place, so it is possible for an unauthenticated remote attacker to exploit it. All architectures and all devices running RouterOS before versions 6.41.3/6.42rc27 are vulnerable.
Source: NVD (NIST), cvelistv5, CISA KEV Catalog
Vendors and products
Affected operating systems
| Other | mikrotik | routeros | 6.42 |
| Other | mikrotik | routeros | — |
Weakness classes (CWE)
CWE-119Improper Restriction of Operations within the Bounds of a Memory Buffer
Class
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Entry at MITRE CWE-119
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited | |
| Reference tagged as exploit | seclists.org (opens in a new tab) | PoC (publicly reported)reported, not verified | — |
| Exploit-DB | EDB-ID 44290 (opens in a new tab)exploit-db.com | PoC (publicly reported)reported, not verified | — |
References & sources
- securityfocus.com103427Vulnerability database, x_refsource_BID, Third-party advisory, Vulnerability database
- seclists.org20180315 [CORE-2018-0003] MikroTik RouterOS SMB Buffer OverflowMailing list, x_refsource_FULLDISC, Exploit, Mailing list, Third-party advisory, Vulnerability database
- exploit-db.com44290Exploit, x_refsource_EXPLOIT-DB, Exploit, Third-party advisory, Vulnerability database
- coresecurity.comadvisories/mikrotik-routeros-smb-buffer-overflowx_refsource_MISC, Exploit, Third-party advisory
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2018-7445government-resource, US government resource
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2018-7445"><img src="https://intel.neosec.eu/badge/cve/CVE-2018-7445.svg?lang=en" alt="CVE-2018-7445 – NEOSEC Intel" height="20"></a>