CVE-2021-20016
Critical · 9.8 CISA KEV · ransomwareCVSS
9.8
EPSS
40.0%
Published
Feb 4, 2021
CISA due date
Nov 17, 2021
Cloudanix analysis
Attackers can break into vulnerable remote-access VPN systems from the internet and steal login or session information that may let them enter the organization’s network.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Trivial
- Impact
- Full Compromise
- Component
- Network Service
- Class
- SQL Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
CVE-2021-20016 is an unauthenticated, network-exploitable SQL injection flaw in SonicWall SMA100 SSL VPN 10.x builds. A remote attacker can manipulate input handled by the appliance so that backend SQL queries are altered, allowing access to sensitive database contents such as usernames, password-related data, session identifiers, and other authentication/session state. Because the vulnerable component is exposed on the VPN interface and requires no prior authentication or user interaction, successful exploitation can lead to credential theft, session hijacking, unauthorized VPN access, configuration exposure, and potentially further compromise of internal resources reachable through the VPN.
Why it matters to the business
This is a high-urgency edge-device vulnerability: it affects internet-facing remote-access infrastructure, has been exploited in the wild, is listed in CISA KEV, and has been associated with ransomware activity. Successful exploitation can allow attackers to steal VPN credentials or active session data, gain unauthorized remote access, bypass normal access controls, and use the VPN as an entry point for data theft, lateral movement, service disruption, or ransomware deployment. CISA’s KEV remediation deadline was 2021-11-17, so any remaining exposure should be treated as overdue and potentially already targeted.
How an attack unfolds
An attacker scans the internet for exposed SonicWall SMA100 SSL VPN portals running vulnerable 10.x firmware. Without logging in, the attacker sends crafted web requests to vulnerable SMA100 application endpoints containing SQL injection syntax. If the appliance is vulnerable, the backend database query is manipulated and returns or exposes sensitive records, commonly including account, password-related, and session-related information. The attacker can then use stolen credentials or session material to authenticate to the VPN, impersonate legitimate users, enumerate accessible internal systems, and continue the intrusion. In observed real-world activity, exploitation of exposed VPN appliances has been used as an initial access path for hands-on-keyboard intrusion and ransomware operations.
How to fix it
Upgrade affected SonicWall SMA100 appliances running 10.x firmware to a vendor-fixed firmware release or later, following SonicWall’s official advisory and upgrade path for CVE-2021-20016. If immediate patching is not possible, remove the SSL VPN interface from direct internet exposure, restrict access to trusted source IP ranges, disable affected services where operationally feasible, enforce MFA, and monitor closely until the appliance is remediated. Because this flaw can expose credentials and session data, remediation should also include invalidating active VPN sessions, rotating passwords for users who authenticated through the appliance, rotating local/admin credentials, reviewing MFA enrollment, and auditing appliance configuration for unauthorized changes. The supplied package fixed-version list references Zimbra repositories rather than SonicWall SMA100 firmware; validate product applicability before using those entries. If those repositories are separately in scope, the listed fixed commits are: zimbra/zm-build 6c3c77b328a0d7d3bafecb79d202960217922ef0, zimbra/zm-mailbox 65929222951131db2cbb2378accbdd5f2fac0980, zimbra/zm-zcs e177bad87d5312e7b2cd1915ae8c0cd2528cacdb, and zimbra/zm-zcs-lib a1cbf80618e47b3cf0894cbbcaec1da9bece583c.
How to confirm the fix worked
Confirm the appliance model and firmware version from the SonicWall SMA100 administrative interface, CLI, asset inventory, or configuration backup, and verify it is no longer running an affected 10.x build. Validate externally that the SSL VPN portal is not exposed to untrusted networks unless it is fully patched and intentionally internet-facing. Run authenticated vulnerability scanning or vendor-supported checks against the appliance version rather than relying only on unauthenticated banners. Confirm that all active VPN sessions were terminated after patching, password rotations were completed for affected users and administrators, and MFA is enforced. Review logs from before and after remediation to confirm that SQL injection-like requests no longer produce anomalous responses and that there are no continued suspicious VPN logins from unusual source IPs, geographies, or user agents.
Typical attack path
- Identify internet-facing SonicWall SMA100 SSL VPN portals.
- Fingerprint firmware or behavior consistent with affected SMA100 10.x builds.
- Send unauthenticated crafted HTTP requests that trigger SQL injection in the SSL VPN application.
- Extract usernames, password-related records, session tokens, or other authentication/session data from the backend database.
- Use stolen credentials or session material to access the VPN as a legitimate user.
- Enumerate internal network access available through the VPN.
- Move laterally, escalate privileges, exfiltrate data, deploy persistence, or stage ransomware.
How to detect it
To determine whether exploitation already occurred, collect and review SonicWall SMA100 web access logs, appliance event logs, VPN authentication logs, administrator audit logs, firewall logs, reverse proxy/WAF logs, SIEM records, EDR telemetry from systems accessed over the VPN, and identity provider logs. Look for unauthenticated requests to SMA100 SSL VPN endpoints containing SQL metacharacters or database keywords, HTTP 500 errors or unusual response sizes around those requests, and follow-on successful VPN logins from the same or related source IPs. Pay close attention to activity before patching and around known exploitation windows, since this issue has been exploited in the wild and is associated with ransomware campaigns. Investigate signs of credential or session abuse: successful logins without expected MFA behavior, impossible travel, repeated logins as many users from one IP, new administrator logins, configuration export events, password or MFA changes, new local users, unexpected bookmarks or access policies, and internal connections initiated shortly after suspicious VPN access. On internal systems, hunt for post-VPN intrusion artifacts such as remote service creation, suspicious PowerShell, credential dumping tools, unusual SMB/RDP/WinRM activity, archive creation, large outbound transfers, and ransomware staging. If reliable appliance logs are unavailable or were cleared, assume higher risk and perform credential rotation plus broader incident response scoping.
- UNION SELECT
- UNION ALL SELECT
- information_schema
- SLEEP(
- BENCHMARK(
- @@version
- 1=1--
- ' OR '1'='1
- " OR "1"="1
- /cgi-bin/sslvpnclient
- /cgi-bin/welcome
- /cgi-bin/login
- sql syntax
- SQL syntax
- mysql_fetch
- ODBC SQL
- HTTP 500 responses from SonicWall SMA100 SSL VPN endpoints
- successful VPN login shortly after SQL injection-like request
- multiple VPN usernames authenticated from the same new external IP
- SonicWall SMA100 administrator login from new external IP
- SonicWall SMA100 configuration export event
- unexpected SonicWall SMA100 local user creation
- unexpected SonicWall SMA100 password change
- unexpected SonicWall SMA100 MFA enrollment change
What your security team should do
- Treat any exposed, unpatched SonicWall SMA100 10.x appliance as potentially compromised because the vulnerability is KEV-listed, long public, actively exploited, and associated with ransomware campaigns.
- Patch or remove internet exposure immediately; prioritize this ahead of routine patch cycles for all internet-facing VPN appliances.
- After patching, invalidate sessions and rotate VPN user passwords, local appliance credentials, administrator credentials, API keys, and any shared secrets stored or managed on the appliance.
- Hunt for exploitation in historical web, VPN, authentication, EDR, firewall, and proxy logs going back at least to public disclosure, and longer if logs are available.
- Review successful VPN logins following suspicious web requests, especially logins from new countries, cloud hosting providers, anonymization services, or impossible-travel patterns.
- Audit appliance configuration, user accounts, MFA settings, routing rules, bookmarks, and access policies for unauthorized changes.
- Check downstream systems reachable from the VPN for lateral movement, credential dumping, remote management abuse, data staging, and ransomware precursors.
- Ensure VPN access is protected by phishing-resistant MFA where possible and limited by conditional access, source restrictions, and least-privilege network segmentation.
- Add SIEM detections for SQL injection patterns against VPN portals and for session/token reuse or anomalous VPN authentication behavior.
- Maintain an inventory of all edge appliances and subscribe to vendor and CISA KEV notifications so exploited perimeter vulnerabilities are remediated within emergency timelines.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-87936 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')… CWE-89
- CVE-2026-87938 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')… CWE-89
- CVE-2026-114664 Frappe Framework before 16.33.0 contains a blind SQL injection vulnerability in the… CWE-89
- CVE-2026-114577 A vulnerability was found in oretnom23 php-travel-agency-system. CWE-89
- CVE-2026-113406 BA-Workflow developed by YS-infoware has a SQL Injection vulnerability. CWE-89
- CVE-2026-113405 BA-Workflow developed by YS-infoware has a SQL Injection vulnerability. CWE-89
- CVE-2026-107081 SQL injection via identifier injection in the tableName and tableFields POST parameters… CWE-89
- CVE-2026-112150 A security flaw has been discovered in vraj404 Criminal-Management-System up to… CWE-89