Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2018-14847: Directory Traversal in MikroTik RouterOS WinBox

Published Aug 2, 2018 · Updated 3 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days2 mentions · peak 1 in a dayToday
CVSS9.1Critical · v3.1
EPSS96.0%100th percentile
CISA KEVYesAdded Dec 1, 2021
In the wildActivePer CISA KEV
Vendor
Mikrotik
IdentifiersCVE-2018-14847CWE-22 · Improper Limitation of a Pathname…

CVE-2018-14847 is a directory traversal vulnerability in the WinBox management interface of MikroTik RouterOS, affecting unpatched releases in the 6.29–6.42 range. Insufficient validation of requested file paths in the mproxy service allows unauthenticated remote attackers to read arbitrary files and authenticated remote attackers to write arbitrary files. Reading the router's credential database can expose reversibly encoded administrator passwords, enabling subsequent authenticated device takeover.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

The vulnerability compromises file confidentiality without authentication and file integrity after authentication. Disclosure of the credential database can enable recovery of administrator passwords and subsequent control over router configuration. Observed follow-on abuse includes persistent scheduled tasks, malicious SOCKS proxies, traffic redirection and interception, cryptomining-code distribution, and recruitment into DDoS botnets. These activities follow device compromise rather than constituting direct unauthenticated code execution through the traversal flaw.

Mitigation

If you can’t patch tonight, do this now.

Block untrusted access to the WinBox management service, normally TCP port 8291, and restrict administration to trusted management networks or a secure VPN such as IPsec. Disable unnecessary management services and remove public Internet exposure of management interfaces. Monitor for unexpected accounts, scripts, scheduled tasks, proxy services, traffic-capture settings, and routing or NAT changes. Strong passwords alone do not prevent unauthenticated file disclosure.

Remediation

Patch, then assume compromise.

Upgrade RouterOS to a current supported release containing the vendor's fix, originally released in April 2018, and update the WinBox client. Change router passwords after patching because credentials may already have been exposed. Review user accounts, scheduled tasks, scripts, NAT rules, DNS settings, SOCKS and HTTP proxy settings, and packet-capture configurations; remove unauthorized changes. Patching alone does not remove attacker-created configuration or invalidate stolen credentials.

Public exploits

Exploits

14 exploits validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
mikrotik_winbox_fileread.rbThis repository is the official Metasploit Framework, a comprehensive and modular exploitation platform widely used for penetration testing, vulnerability research, and red teaming. The structure includes configuration files, Ruby code for the core framework, auxiliary data (such as exploit templates and payloads), and extensive documentation. The framework supports a vast array of exploits, payloads, and post-exploitation modules, enabling users to target network services, local vulnerabilities, and various platforms. Notable directories include 'app/' for Rails models and concerns, 'config/' for environment and database setup, and 'data/' for exploit and payload resources. The presence of files like 'data/exploits/CVE-2008-6508/plugin.xml' and 'data/exploits/CVE-2010-1240/template.pdf' indicates support for specific CVEs. The framework is highly weaponized, allowing users to select, configure, and launch exploits with customizable payloads, making it a powerful tool for both offensive and defensive security professionals.Disclosed Aug 2, 2018 · Framework: metasploit · ruby · yaml · network · localWeaponizedWinboxExploitThis repository is a C# implementation of an exploit for the MikroTik Winbox directory traversal vulnerability (CVE-2018-14847). The solution consists of two main projects: a core library (MST.MikroTik.WinboxExploit) containing the exploit logic, and a WPF GUI application (MST.MikroTik.WinboxExploit.WinApp) that provides a user interface for entering the target IP address and port. The exploit works by sending specially crafted TCP packets to the Winbox service (default port 8291) on the target device, exploiting the vulnerability to retrieve and decrypt user credentials. The GUI allows the user to specify the target and displays the extracted usernames and passwords. The code is operational and provides a working exploit for affected MikroTik RouterOS devices. No hardcoded payloads or shell access is provided; the exploit is focused on credential extraction.msterusky · Disclosed Sep 11, 2018 · csharp · xml · networkOperationalMikroRootThis repository is an automated exploit for CVE-2018-14847, targeting MikroTik RouterOS devices vulnerable via the Winbox service on TCP port 8291. The main script, 'MikroRoot.py', uses the Shodan API to search for publicly accessible MikroTik routers, then attempts to exploit each found device by sending crafted binary payloads to port 8291. Upon successful exploitation, it extracts the user database and passes the data to 'extract_user.py', which parses and decrypts the usernames and passwords using a known static key. The exploit outputs the credentials and IP address of each compromised router. The repository consists of two main Python scripts: 'MikroRoot.py' (the orchestrator and exploit logic) and 'extract_user.py' (handles credential extraction and decryption). The README provides usage instructions and references the original vulnerability. No hardcoded endpoints are present, but the exploit targets any IP found via Shodan with an open Winbox port. The exploit is operational, requiring only a Shodan API key and Python 3 to run.syrex1013 · Disclosed Oct 13, 2018 · python · networkOperationalPython-MikrotikLoginExploitThis repository provides a set of Python scripts to exploit the Mikrotik RouterOS Winbox vulnerability (CVE-2018-14847). The exploit targets vulnerable Mikrotik routers by either IP (using the Winbox service on TCP port 8291) or by MAC address (using the MAC server protocol over UDP). The main scripts are: - WinboxExploit.py: Exploits the Winbox service via TCP/IP to extract and decrypt user credentials from the router. - MACServerDiscover.py: Scans the local network for Mikrotik devices by broadcasting on UDP port 5678 and lists their MAC addresses. - MACServerExploit.py: Exploits the router via the MAC server protocol (UDP/20561) using the discovered MAC address to extract credentials. - extract_user.py: Contains logic to decrypt the extracted user credentials from the router's response. The exploit works by sending specially crafted binary packets to the target service, receiving a response containing encrypted credentials, and then decrypting them using a static key. The README provides detailed usage instructions, affected versions, and mitigation advice. The repository is a functional proof-of-concept exploit, not just a detection script, and is operational with working payloads for credential extraction.sinichi449 · Disclosed Sep 29, 2019 · python · networkOperationalCVE-2018-14847This repository is a small standalone exploit project for CVE-2018-14847 affecting MikroTik RouterOS. It contains 4 files total: a Python exploit script under Exploit/, a README, a GPL license, and a .gitignore. The only code file and clear entry point is Exploit/Exploit_CVE_2018_14847.py. The exploit is a real unauthenticated network exploit, not a detector. It manually implements MikroTik's proprietary Winbox M2 protocol over TCP and sends two crafted packets: first an open-file request to the Winbox filesystem handler, then a read-file request using the returned session ID. The open request contains a path traversal string that escapes the intended directory boundary and accesses /flash/rw/store/user.dat, the RouterOS credential database. After receiving the file contents, the script parses nv::message-style records and decrypts stored passwords using a static MD5-derived XOR scheme based on the username and hardcoded salt 283i4jfkai3389. Primary capability: remote unauthenticated credential extraction from vulnerable MikroTik routers. The script does not itself write files or spawn a shell, so it is best classified as OPERATIONAL rather than weaponized; however, the recovered credentials can directly enable administrative access. The README also documents post-exploitation possibilities involving the hidden developer login by creating /pckg/option and /flash/nova/etc/devel-login, but those actions are described rather than implemented in the provided code. Fingerprintable targets and observables include the Winbox TCP service on port 8291, the internal Winbox filesystem handler (sys=5, handler=0), and the traversal target path /////./..//////./..//////./../flash/rw/store/user.dat. Overall, the repository's purpose is to provide a documented Python reimplementation of the known MikroTik Winbox path traversal exploit for extracting and decrypting RouterOS credentials.TheMalwareGuardian · Disclosed Apr 27, 2026 · python · markdown · networkOperationalVULNERAVEL-CVE-2018-14847---CREDENCIAIS-EXTRAIDASRepository contains a single standalone Python exploit script and a README. The main file, cve_2018_14847.py, implements an unauthenticated network exploit for CVE-2018-14847 against MikroTik RouterOS Winbox. It uses raw TCP sockets to connect to the target Winbox service, sends a first hardcoded M2 protocol payload containing a traversal path to request /flash/rw/store/user.dat, extracts a session ID from byte offset 38 of the response, injects that ID into a second hardcoded payload, and retrieves the file contents. The script then parses M2-formatted records from the returned data, extracts username and encrypted password fields, and decrypts passwords using the known RouterOS XOR scheme derived from MD5(username + fixed salt 283i4jfkai3389). Successful exploitation yields plaintext credentials, which are printed and saved locally. The repository is small, purpose-built, and clearly intended for credential dumping from vulnerable MikroTik devices rather than detection only.mourafuseti · Disclosed May 20, 2026 · python · markdown · networkOperationalmisfortune-cookieThis 13-file Python PoC suite is centered on CVE-2014-9222 (Misfortune Cookie) in AllegroSoft RomPager, with an interactive console in main.py and standalone modules for fingerprinting, detection, authentication bypass, and denial of service. common.py contains a per-device realm-to-cookie-offset table covering multiple Billion, D-Link, TP-Link, Zyxel, and Azmoon models. The RomPager detector sends a canary cookie to confirm request-URI corruption; auth_bypass.py uses firmware-specific magic cookies to write authentication state; dos.py sends oversized Cookie headers and polls for a watchdog reboot. The suite also includes operational exploit modules for Accellion FTA CVE-2021-27101/27102 (Host-header SQLi to recover a secret, then write/verify a PHP webshell), Huawei HG532 CVE-2017-17215 (SOAP command injection), and MikroTik WinBox CVE-2018-14847 (directory traversal file read and credential decryption). scan.py combines service probes, although its WinBox check performs an actual credential-store read rather than a purely passive fingerprint.luel-4013 · Disclosed Sep 7, 2026 · python · network · webOperationalCVE-2026-67279-Mikrotik-6.42-POCThis standalone repository contains one Python executable, two documentation files, a pinned Paramiko dependency, and a .gitignore excluding credentials and device artifacts. The SSH implementation starts a transport without authenticating, initiates rekey through Paramiko's private _send_kex_init method, and tests whether a session channel can then open. Detect mode compares separate connections before and after rekey; its positive verdict establishes channel-access behavior, not independently verified full console privileges. Documentation describes console initialization using a PTY, shell request, prompt waiting, and automatic terminal-query responses. Console mode supports configurable commands; pawn mode reportedly creates a full-permission account and checks password-authenticated SSH access without automatically removing the account. The source also exposes a creds mode absent from the English overview's mode discussion: it contains WinBox request bytes targeting user.dat and visible logic for parsing, decrypting, filtering, and printing recovered credentials. CVE-2026-86060 is discussed only as a separate RouterOS 7.x chain stage and is explicitly not implemented here. The supplied Python content is truncated midway through the file, so console, account-creation, WinBox retrieval, parsing, and decryption implementations cannot be fully inspected. Exploitation success and the reported CVE applicability were not independently verified. No fixed external callback or exfiltration destination is visible. Repository URL, git reference, and archive size were not supplied; their metadata fields use empty strings and zero as unknown placeholders. The five listed file sizes total 18,668 bytes, which is not an archive-size measurement.shmaki4 · Disclosed Oct 8, 2026 · python · networkOperationalCVE-2026-86426The repository contains a Python reconnaissance/exploitation script (27,148 bytes) and a French README (1,034 bytes). It is standalone rather than an identifiable exploit-framework module. Its central exploit attempt sends {"api_token": [0]} in JSON GET requests, claiming an unauthenticated LibreNMS API type-confusion bypass associated with CVE-2026-86426. The visible helper accepts HTTP 200 responses that parse as JSON; that behavior alone does not establish successful authentication bypass. The main workflow calls device enumeration, enrichment, global-data collection, SNMP probing, topology construction, MikroTik CVE assessment, Oxidized retrieval, and JSON/CSV export. SNMP helpers invoke the external snmpwalk executable using argument lists, including SNMPv3 MD5/AES authPriv and SNMPv2c community authentication. Defined OIDs cover system identity, LLDP neighbors, ARP entries, and IP addresses. This supports a potential progression from exposed monitoring data and credentials to broader network reconnaissance and sensitive configuration collection, not remote code execution. The MikroTik CVEs are secondary assessment references, not implemented exploit payloads. Their mappings and fixed-version thresholds are repository assertions and were not independently verified. The supplied Python content is substantially truncated, so exact API routes, credential extraction, Oxidized requests, vulnerability comparison logic, concurrency behavior, and export implementation cannot be fully assessed. The claimed primary CVE and affected LibreNMS versions likewise cannot be validated from this material. No fixed external destination, command-and-control server, or destructive payload is visible. The README's launch example names librenms_full_audit.py, which is absent from the supplied file list; the actual entry point is CVE-2026-86426.py, which prompts for its target URL. Repository URL, git reference, and archive size were not supplied; empty strings and zero are used as metadata placeholders.Guila95 · Disclosed Oct 25, 2026 · python · web · networkOperationalWinboxPoCThis repository provides a proof-of-concept exploit for CVE-2018-14847, a critical vulnerability in Mikrotik RouterOS (WinBox service) that allows unauthenticated attackers to read arbitrary files, including those containing plaintext user credentials. The repository contains several Python scripts: - WinboxExploit.py: Main exploit script for targeting devices via TCP/IP (WinBox service, default port 8291). It crafts and sends protocol-specific packets to extract and decrypt user credentials. - MACServerExploit.py: Exploits the same vulnerability over the MAC server (Layer 2), allowing attacks even if the device lacks an IP address. It communicates over UDP port 20561 using the device's MAC address. - MACServerDiscover.py: Discovers Mikrotik devices on the local network by broadcasting on UDP port 5678 and listing their MAC addresses. - extract_user.py: Contains logic to decrypt and extract usernames and passwords from the data returned by the exploit scripts. The exploit is effective against Mikrotik RouterOS versions released between 2015-05-28 and 2018-04-20, specifically versions 6.29-6.42 (stable), 6.30.1-6.40.7 (longterm), and 6.29rc1-6.43rc3 (beta). The exploit does not require authentication and provides plaintext credentials if successful. The repository is structured for ease of use, with each script serving a distinct role in the exploitation process.BasuCert · Disclosed Jun 24, 2018 · python · network · localPoCCVE-2018-14847This repository provides a proof-of-concept exploit for CVE-2018-14847, a critical vulnerability in Mikrotik RouterOS (WinBox service) that allows unauthenticated remote attackers to read arbitrary files, including those containing plaintext credentials. The repository contains several Python scripts: - WinboxExploit.py: The main exploit script for targeting the WinBox TCP service (default port 8291) on a Mikrotik device. It crafts and sends specific packets to exploit the vulnerability, retrieves the user.dat file, and uses extract_user.py to decrypt and display usernames and passwords. - MACServerExploit.py: Exploits the same vulnerability over the MAC-based (Layer 2) WinBox protocol, allowing exploitation even if the device does not have an IP address, as long as it is on the same local network segment. - MACServerDiscover.py: A discovery tool that broadcasts on UDP port 5678 to find Mikrotik devices (MAC servers) on the local network. - extract_user.py: Contains logic to decrypt and extract user credentials from the user.dat file obtained from the exploit. - push.sh: A simple git helper script (not related to exploitation). The exploit scripts require Python 3 and target Mikrotik RouterOS versions from 2015-05-28 to 2018-04-20. The README provides detailed usage instructions, affected versions, and mitigation advice. The main attack vectors are network-based (TCP/8291) and local network (UDP/20561, UDP/5678) for MAC-based exploitation and device discovery. No hardcoded IPs or domains are present, but the scripts interact with broadcast addresses and specific service ports.jas502n · Disclosed Dec 15, 2018 · python · bash · network · localPoCMikrotik-router-hackThis repository provides a proof-of-concept exploit for CVE-2018-14847, a critical vulnerability in Mikrotik RouterOS (Winbox service) that allows unauthenticated remote file read, exposing plaintext user credentials. The repository contains four main Python scripts: - WinboxExploit.py: Exploits the Winbox service over TCP/IP (default port 8291) to extract and decrypt user credentials from vulnerable Mikrotik devices. - MACServerExploit.py: Exploits the same vulnerability over Layer 2 (MAC server) using UDP (port 20561), allowing exploitation even if the device lacks an IP address. - MACServerDiscover.py: Discovers Mikrotik devices on the local network via UDP broadcast (port 5678). - extract_user.py: Contains logic to decrypt and extract usernames and passwords from the data returned by the exploits. The exploit works by sending specially crafted binary packets to the target service, leveraging the vulnerability to read sensitive files and extract user credentials. The README provides detailed usage instructions, affected versions, and mitigation advice. No fake or destructive code is present; the repository is a functional proof-of-concept for research and testing purposes.hacker30468 · Disclosed Apr 21, 2021 · python · networkPoCCVE-2018-14847-EXPLOITThis repository provides a Python proof-of-concept exploit for CVE-2018-14847, a directory traversal vulnerability in MikroTik RouterOS (up to version 6.42) via the WinBox service (default TCP port 8291). The main file, CVE-2018-14847.py, implements the exploit logic: it crafts and sends specific WinBox protocol packets to the target, exploiting improper input validation to read arbitrary files from the router's filesystem. The exploit specifically targets the 'flash/rw/store/user.dat' file, which contains user credentials, and includes logic to decrypt the extracted passwords. The script supports both single-target and multi-target modes (via a file of IPs) and uses multithreading for efficiency. The repository also includes a README.md with background and usage information, and a requirements.txt listing Python dependencies. The exploit is a functional PoC, not weaponized, and is intended for research and educational purposes.K3ysTr0K3R · Disclosed Apr 22, 2024 · python · networkPoCCVE-2018-14847This repository is a Python proof-of-concept exploit for CVE-2018-14847, a critical vulnerability in MikroTik RouterOS's WinBox service. The main script, T4.py, allows the user to scan a single IP or multiple IPs (from targets.txt) for the vulnerability. It checks if the WinBox port (default 8291) is open, sends specially crafted packets to exploit the vulnerability, and attempts to read the /flash/rw/store/user.dat file, which contains user credentials. The extract_user.py module is responsible for parsing and decrypting the credentials from the extracted file data. The exploit outputs plaintext usernames and passwords if successful. The repository includes a README with usage instructions, a LICENSE, and a sample targets.txt file. The exploit is network-based, targeting TCP port 8291, and is specifically designed for MikroTik RouterOS devices vulnerable to CVE-2018-14847.tausifzaman · Disclosed Apr 16, 2025 · python · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
MikrotikRouterosapplication
FAQ

Frequently asked questions

Is CVE-2018-14847 exploited in the wild?
Yes. As of Nov 19, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Dec 1, 2021.
Is there a public exploit for CVE-2018-14847?
Yes. Mallory tracks 14 public exploits or proofs of concept for CVE-2018-14847, the earliest disclosed Jun 24, 2018.
Is there a patch for CVE-2018-14847?
Upgrade RouterOS to a current supported release containing the vendor's fix, originally released in April 2018, and update the WinBox client. Change router passwords after patching because credentials may already have been exposed.
What products are affected by CVE-2018-14847?
Mikrotik Routeros.
How severe is CVE-2018-14847?
CVE-2018-14847 has a CVSS v3.1 score of 9.1 (Critical) and an EPSS score of 96.0% (100th percentile) as of Nov 19, 2026.
Activity feed

Recent activity

27 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
nuclei templates pull requestsNews · Nov 19, 2026Add CVE-2018-14847 - MikroTik RouterOS <= 6.42 - WinBox Unauthenticated Directory Traversal by ArjunSecurin · Pull Request #17966 · projectdiscovery/nuclei-templatesAn unauthenticated directory traversal vulnerability in MikroTik RouterOS WinBox, identified in the title as affecting versions <= 6.42. The pull request adds a Nuclei detection template probing /flash/rw/store/user.dat. Local test output shows file-opened and traversal-resolved matches, with no matches reported for versions 6.40.8 and 6.43. These are local detection tests, not evidence of exploitation in the wild.Read more ↗huntio blogNews · Oct 20, 2026Ukraine’s State Data-Exchange System Targeted by Russian-Speaking Operator via Graylog Log4ShellA MikroTik RouterOS vulnerability used in an automated exploitation loop against devices discovered near previously selected targets. The report describes this subnet-expansion activity as unsuccessful and does not explain the vulnerability's underlying mechanism.Read more ↗cve mitreNews · Jan 1, 2026CVE Record: CVE-2018-14847A directory traversal vulnerability in the MikroTik RouterOS WinBox interface that allows unauthenticated arbitrary file read and authenticated arbitrary file write on affected RouterOS versions through 6.42.Read more ↗mbsd blogNews · Sep 13, 20232023年8月度 MBSD-SOCの検知傾向トピックス | 技術者ブログ | 三井物産セキュアディレクション株式会社A MikroTik RouterOS vulnerability that can allow an unauthenticated remote attacker to read and write arbitrary files; the article says attacks targeting it increased.Read more ↗
+15 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence1Every report linking this CVE to a named adversary.
Associated malware17Malware families linked to this CVE, with evidence and IOCs.
Detection signatures2YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity5Community discussion across Reddit, Mastodon, and other social sources.