Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2023-33538: Authenticated Command Injection in TP-Link Legacy Routers

Published Jun 7, 2023 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS41.6%99th percentile
CISA KEVYesAdded Jun 16, 2025
In the wildActivePer CISA KEV
Vendor
TP-Link
IdentifiersCVE-2023-33538CWE-78

CVE-2023-33538 is an OS command injection vulnerability in the web-management functionality of end-of-life TP-Link TL-WR940N V2/V4, TL-WR841N V8/V10, and TL-WR740N V1/V2 routers. The SSID configuration parameter ssid1 is insufficiently sanitized before being incorporated into a shell command used to configure the wireless interface. The constructed command ultimately reaches a shell execution function, allowing injected operating-system commands to run on the router.

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.

An authenticated attacker can execute arbitrary system commands on a vulnerable router. Firmware emulation confirmed command injection and demonstrated modification of a startup script, providing a potential persistence mechanism. Successful compromise could therefore permit alteration of router configuration and execution of attacker-controlled actions within the router's constrained BusyBox environment.

Mitigation

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

Ensure the router web-management interface is protected with non-default, strong administrative credentials. Retire affected routers from active networks where possible; replacement is the primary mitigation because the affected devices no longer receive security updates.

Remediation

Patch, then assume compromise.

The affected router versions are end-of-life and no longer supported. Replace affected devices with currently supported hardware, as vendor patches are not expected for these models.

Public exploits

Exploits

3 exploits validated by Mallory's analysis.

View more in app →
CVE-2023-33538This repository contains a Python exploit script (tplink.py) targeting a command injection vulnerability in TP-Link TL-WR940N and TL-WR841N routers. The exploit abuses improper input sanitization in the 'ssid1' parameter of the '/userRpm/WlanNetworkRpm.htm' HTTP endpoint, allowing an attacker to execute arbitrary commands on the router. The script supports three main functions: testing for vulnerability (default command: reboot), executing custom commands, and obtaining a reverse shell (if the router supports the required binaries). The script can automatically detect random path components in the URL, which are present in some firmware versions. The exploit requires valid credentials (default: admin/admin) and network access to the router. The repository consists of a README.md with usage instructions and a single Python script implementing the exploit logic. No detection-only scripts or fake payloads are present; the code is operational and provides real exploitation capabilities.explxx · Disclosed Jun 22, 2025 · python · networkOperationalCVE-2023-33538-msfThis repository contains a Metasploit auxiliary module (tplink_ssid1_rce.rb) that exploits an authenticated command injection vulnerability (CVE-2023-33538) in TP-Link TL-WR940N (V2/V4) and TL-WR841N (V8/V10) routers. The exploit targets the 'ssid1' parameter in the /userRpm/WlanNetworkRpm.htm HTTP endpoint, allowing arbitrary shell command execution on the device. The module requires the attacker to supply a valid Authorization cookie and session path, which must be manually extracted after logging into the router's web interface. The exploit is operational, allowing the user to specify any shell command to execute. The repository includes a README with usage instructions and references, and the main exploit logic is implemented in a single Ruby file compatible with the Metasploit framework.mrowkoob · Disclosed Jun 23, 2025 · Framework: metasploit · ruby · networkOperationaltplink-osciThis repository is a minimal Python proof-of-concept exploit consisting of a single executable script (xp.py) and a trivial README containing only an image link. The script is a standalone remote command injection exploit targeting TP-Link router functionality related to wireless configuration. It supports two exploitation paths: (1) an HTTP-based attack against the router web admin endpoint /userRpm/WlanNetworkRpm.htm, and (2) a UDP-based TDDP mode that sends a crafted packet to port 1040. In both cases, the exploit places shell metacharacters around an attacker-controlled command in an SSID-related field, indicating the underlying vulnerability is command injection during processing of wireless settings. The HTTP mode uses a Cookie header with Authorization=Basic <base64> and defaults to admin/admin credentials, then submits parameters such as ssid1, channel, mode, chanWidth, secType, and Save. The TDDP mode builds a 380-byte buffer, writes integer values at fixed offsets, inserts the command into a 32-byte SSID field, and sends the packet over UDP. The default payload is a benign reconnaissance command ('uname -a'), but the user can supply arbitrary commands with -cmd. Overall, this is a real exploit script, not a detector, and is operational but basic: it provides direct RCE capability with hardcoded protocol logic and limited response handling.eev4n · Disclosed Apr 19, 2026 · python · markdown · web · networkOperational
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
TP-LinkTl-Wr740n Firmwareoperating_system
TP-LinkTl-Wr841n Firmwareoperating_system
TP-LinkTl-Wr940n Firmwareoperating_system
FAQ

Frequently asked questions

Is CVE-2023-33538 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jun 16, 2025.
Is there a public exploit for CVE-2023-33538?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2023-33538, the earliest disclosed Jun 22, 2025.
Is there a patch for CVE-2023-33538?
The affected router versions are end-of-life and no longer supported. Replace affected devices with currently supported hardware, as vendor patches are not expected for these models.
What products are affected by CVE-2023-33538?
TP-Link Tl-Wr740n Firmware, TP-Link Tl-Wr841n Firmware, and TP-Link Tl-Wr940n Firmware.
How severe is CVE-2023-33538?
CVE-2023-33538 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 41.6% (99th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

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

View more in app →
+4 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 evidenceEvery report linking this CVE to a named adversary.
Associated malware11Malware families linked to this CVE, with evidence and IOCs.
Detection signatures3YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity64Community discussion across Reddit, Mastodon, and other social sources.