Remote code execution in Mikrotik RouterOS HTTP server



Published: 2017-03-07 | Updated: 2017-03-29
Risk Critical
Patch available YES
Number of vulnerabilities 1
CVE ID N/A
CWE ID CWE-121
Exploitation vector Network
Public exploit This vulnerability is being exploited in the wild.
Vulnerable software
Subscribe
MikroTik RouterOS
Hardware solutions / Routers & switches, VoIP, GSM, etc

Vendor MikroTik

Security Advisory

This security advisory describes one critical risk vulnerability.

1) Stack-based buffer overflow

Risk: Critical

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

CVE-ID: N/A

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 boundary error within the HTTP server component. A remote attacker can send a specially crafted HTTP POST request to the affected device and trigger stack-based buffer overflow.

Successful exploitation of the vulnerability may allow an attacker to execute arbitrary code on the target system.

Note: this vulnerability was disclosed in the "Vault 7" leak by Wikileaks project. The codename of the exploit affecting Mikrotik RouterOS is ChimayRed.

Mitigation

Update to version 6.38.5.

Vulnerable software versions

MikroTik RouterOS: 5.7, 5.8, 5.9, 5.11, 5.12, 5.13, 5.14, 5.16, 5.17, 5.18, 5.19, 5.20, 5.21, 5.22, 5.23, 5.24, 5.25, 5.26, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.9, 6.11, 6.12, 6.13, 6.14, 6.15, 6.16, 6.17, 6.18, 6.19, 6.20, 6.21.1, 6.22, 6.23, 6.24, 6.25, 6.26, 6.27, 6.28, 6.29, 6.29.1, 6.30, 6.30.2, 6.30.4, 6.32.1, 6.32.2, 6.32.3, 6.32.4, 6.33, 6.33.1, 6.33.2, 6.33.3, 6.33.5, 6.33.6, 6.34, 6.34.1, 6.34.2, 6.34.3, 6.34.4, 6.34.5, 6.34.6, 6.36, 6.36.1, 6.36.2, 6.36.3, 6.36.4, 6.37, 6.37.1, 6.37.2, 6.37.3, 6.37.4, 6.37.5, 6.38, 6.38.1, 6.38.2, 6.38.3, 6.38.4

CPE External links

http://www.wizzycom.net/mikrotik-
http-server-vulnerability/
https://wikileaks.org/ciav7p1/cms/page_16384604.html

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

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. However, a fully functional exploit for this vulnerability is available.