Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2024-40766: Improper Access Control in SonicWall SonicOS Management and SSLVPN

Published Aug 23, 2024 · Updated 10 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days17 mentions · peak 8 in a dayToday
CVSS9.8Critical · v3.1
EPSS18.4%97th percentile
CISA KEVYesAdded Sep 9, 2024
In the wildActivePer CISA KEV
Vendor
Sonicwall
IdentifiersCVE-2024-40766CWE-284 · Improper Access Control
Also known assnwlid_2024_0015

CVE-2024-40766 is an improper access control vulnerability in the management access and SSLVPN functionality of SonicWall SonicOS. It affects supported Gen 5 and Gen 6 firewall models running vulnerable firmware and Gen 7 devices running SonicOS 7.0.1-5035 or earlier. Exploitation can permit unauthorized resource access, bypass security policies, compromise data confidentiality, and, under specific conditions, crash the firewall. Technical details of the vulnerable functions and triggering requests have not been publicly established. The vulnerability has been exploited in ransomware-related intrusions, including activity associated with Akira and SafePay.

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.

Successful exploitation can compromise confidentiality and integrity through unauthorized access to resources and potentially allow data viewing, modification, or deletion. A firewall crash can cause denial of service and disrupt connectivity. Compromised management or VPN access can also provide an initial foothold for subsequent credential theft, lateral movement, data exfiltration, and ransomware deployment; these follow-on actions are not intrinsic capabilities of the vulnerability.

Mitigation

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

Disable SSLVPN when unnecessary, or restrict access to trusted source addresses if it must remain enabled. Restrict firewall management to trusted networks and disable unnecessary Internet-facing WAN management. Enable MFA for all SSLVPN and administrative accounts, rotate local account passwords, and require password changes where appropriate. Remove inactive accounts and review LDAP group mappings and service-account privileges to prevent excessive VPN access. Restrict and monitor Virtual Office Portal access, review authentication and management logs, and monitor for suspicious account changes and remote access. These measures supplement rather than replace firmware updates and credential resets.

Remediation

Patch, then assume compromise.

Apply the model-specific fixed firmware identified in SonicWall advisory SNWLID-2024-0015 or a newer supported release. Identified fixed releases include SonicOS 5.9.2.14-13o for Gen 5 SOHO devices, 6.5.2.8-2n for Gen 6 SM9800 and NSsp 12400/12800 devices, and 6.5.4.15-116n for other affected Gen 6 models. Upgrade affected Gen 7 devices from SonicOS 7.0.1-5035 or earlier to a vendor-fixed release; later campaign guidance recommends SonicOS 7.3.0 or newer for additional brute-force protections. Reset locally managed SSLVPN account passwords, particularly credentials retained during Gen 6-to-Gen 7 migrations. Firmware updates alone do not invalidate previously compromised credentials. Investigate suspected compromise rather than treating patching as complete incident remediation.

Public exploits

Exploits

1 exploit validated by Mallory's analysis.

View more in app →
sonicwall-audit-toolkitRepository purpose: a Python-based SonicWall “Security Audit Toolkit” plus a Docker CTF-style lab that simulates and (in solutions) exploits two critical SonicWall CVEs. Top-level structure: - sonicwall_audit.py: main orchestrator CLI that runs modules (ssl, cve, auth, web) against a target https://<host>:<port>, writes JSON/text reports to reports/. - validate_cves.py: standalone deep validators for CVE-2021-20038 and CVE-2024-53704 using non-destructive behavioral checks. - modules/: implementation of auditors/validators and report generation. - lab/: docker-compose lab with two containers: - cve-2021-20038: Apache + deliberately vulnerable 32-bit CGI binary /usr/lib/cgi-bin/sslvpnclient (and symlinks portal/welcome/etc). Protections disabled (no canary, execstack, no PIE, ASLR disabled in entrypoint) to make stack overflow exploitation feasible. - cve-2024-53704: Flask/Gunicorn SSLVPN simulator on 4433 with vulnerable swap cookie deserialization (conditional HMAC verification). - lab/exploits/: skeleton exploit templates (incomplete). - lab/solutions/: working exploits. Exploit capabilities present: 1) CVE-2024-53704 (auth bypass via cookie forgery): Working exploit forges a base64-encoded JSON session cookie named swap with {username, authenticated:true} and omits sig_version so the server skips HMAC verification. It then accesses /virtual-office/ and /dashboard to retrieve the flag. 2) CVE-2021-20038 (stack buffer overflow -> RCE): Working exploit crafts a URL-encoded query string payload to overflow a 4096-byte stack buffer in the CGI handler (strcpy of QUERY_STRING). Payload includes a NOP sled, null-free 32-bit x86 Linux shellcode that runs /bin//sh -c "cat /root/flag.txt", padding to offset 4100, and an attacker-chosen return address into the sled. Output is returned in the HTTP response body. Important distinction: the main toolkit modules and CVE validators are primarily scanners/validators and explicitly avoid destructive exploitation; the actual exploitation code is confined to the lab solution scripts intended for the local practice environment.anir0y · Disclosed Feb 23, 2026 · python · c · network · local (docker lab)Weaponized
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
SonicwallSonicosoperating_system
FAQ

Frequently asked questions

Is CVE-2024-40766 exploited in the wild?
Yes. As of Nov 8, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Sep 9, 2024.
Is there a public exploit for CVE-2024-40766?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2024-40766, the earliest disclosed Feb 23, 2026.
Is there a patch for CVE-2024-40766?
Apply the model-specific fixed firmware identified in SonicWall advisory SNWLID-2024-0015 or a newer supported release. Identified fixed releases include SonicOS 5.9.2.14-13o for Gen 5 SOHO devices, 6.5.2.8-2n for Gen 6 SM9800 and NSsp 12400/12800 devices, and 6.5.4.15-116n for other affected Gen 6 models.
What products are affected by CVE-2024-40766?
Sonicwall Sonicos.
How severe is CVE-2024-40766?
CVE-2024-40766 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 18.4% (97th percentile) as of Nov 8, 2026.
Activity feed

Recent activity

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

View more in app →
zeropath blogNews · Nov 6, 2026Brief Summary: SonicOS CVE-2026-107154 Management Interface Session Validation Flaw (CWE-291) - ZeroPath Blog | ZeroPathA previously disclosed vulnerability referenced as historical context for attacks on SonicWall access infrastructure. The content associates its exploitation with Akira ransomware activity, including likely initial access in a June 2025 incident targeting Nutanix AHV systems. Its technical root cause is not described, and no relationship to CVE-2026-107154 is established.Read more ↗zeropath blogNews · Nov 6, 2026Brief Summary: SonicOS CVE-2026-107155 Permissive Cross-Domain (CORS) Policy in the Management API - ZeroPath Blog | ZeroPathA separate SonicWall firmware vulnerability mentioned as historical background, not as part of the management API vulnerability pair. The article reports significant correlation with 2025 SSLVPN incidents and says Akira affiliates likely abused it alongside stolen credentials. It does not describe the vulnerability's technical root cause.Read more ↗levelblue spiderlabs blogNews · Oct 28, 2026LevelBlue TTP Briefing Q3 2026: Trusted Access Fuels Data TheftA vulnerability affecting SonicWall SonicOS SSLVPN, reported as actively exploited in Q3 2026. The content does not describe its technical mechanism or impact.Read more ↗safebreach blogNews · Oct 21, 2026SafePay Ransomware: AA26-293A | SafeBreach CoverageAn improper-access-control vulnerability affecting SonicWall SonicOS. It is described as an initial-access vector used by both SafePay and Akira ransomware operations.Read more ↗
+83 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 evidence41Every report linking this CVE to a named adversary.
Associated malware67Malware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity107Community discussion across Reddit, Mastodon, and other social sources.