Remote code execution in MikroTik RouterOS



Published: 2018-03-16
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE ID CVE-2018-7445
CWE ID CWE-121
Exploitation vector Local network
Public exploit N/A
Vulnerable software
Subscribe
MikroTik RouterOS
Hardware solutions / Routers & switches, VoIP, GSM, etc

Vendor MikroTik

Security Advisory

This security advisory describes one medium risk vulnerability.

1) Stack-based buffer overflow

Risk: Medium

CVSSv3: 7.8 [CVSS:3.0/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:U/RL:O/RC:C] [PCI]

CVE-ID: CVE-2018-7445

CWE-ID: CWE-121 - Stack-based Buffer Overflow

Exploit availability: No

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a stack-based buffer overflow when processing NetBIOS session request messages. A remote unauthenticated attacker can send a specially crafted NetBIOS session request message with malformed NetBIOS names, trigger stack-based buffer overflow and cause denial of service conditions or execute arbitrary code on the target system.

Successful exploitation of the vulnerability may allow an attacker to gain full access to the affected router but requires that SMB service is running.

Mitigation

Update to version 6.40.7 or 6.41.3.

Vulnerable software versions

MikroTik RouterOS: 6.40, 6.40.1, 6.40.2, 6.40.3, 6.40.4, 6.40.5, 6.40.6, 6.41, 6.41.1, 6.41.2

CPE External links

https://www.coresecurity.com/advisories/mikrotik-routeros-smb-buffer-overflow

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote authenticated user via the local network (LAN).

How the attacker can exploit this vulnerability?

The attacker would have to send a specially crafted request to the affected device in order to exploit this vulnerability.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.