Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2022-1040: Authentication Bypass and Remote Code Execution in Sophos Firewall

Published Mar 25, 2022 · Updated 4 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days2 mentions · peak 1 in a dayToday
CVSS9.8Critical · v3.1
EPSS99.8%100th percentile
CISA KEVYesAdded Mar 31, 2022
In the wildActivePer CISA KEV
Vendor
Sophos
IdentifiersCVE-2022-1040CWE-287

CVE-2022-1040 is an authentication bypass vulnerability in the User Portal and Webadmin interfaces of Sophos Firewall version 18.5 MR3 (18.5.3) and earlier. A remote, unauthenticated attacker with network access to either interface can bypass authentication and execute arbitrary code on the firewall. The vulnerability has a CVSS score of 9.8 and was exploited as a zero-day, including by TA413, before its public disclosure in March 2022.

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 compromises the affected firewall through unauthenticated arbitrary code execution, threatening the confidentiality, integrity, and availability of the appliance. Attackers can deploy backdoors and use the compromised edge device to support persistent access and subsequent network intrusion. GoMet deployment has been observed following exploitation of this vulnerability.

Mitigation

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

Disable WAN access to the User Portal and Webadmin interfaces. Use VPN access or Sophos Central for remote access and management rather than exposing these interfaces directly to the internet. Restrict interface access to trusted networks.

Remediation

Patch, then assume compromise.

Apply the Sophos hotfix for CVE-2022-1040 and verify that installation succeeded. Automatic hotfix installation is enabled by default; enabled devices check for hotfixes every 30 minutes and after restarting. Older versions and end-of-life products may require manual remediation according to Sophos guidance. Ensure the firewall is maintained on a supported, updated release.

Public exploits

Exploits

2 exploits validated by Mallory's analysis. Hidden: 3 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
cve-2022-1040This repository provides a proof-of-concept (POC) exploit for CVE-2022-1040, an authentication bypass vulnerability in the Sophos Firewall web admin interface. The repository contains two main Python files (Sophos-poc.py and Docker/Sophos-poc.py, which are identical), a Dockerfile for containerized execution, and a README with usage instructions. The exploit works by running a local HTTPS man-in-the-middle (MITM) proxy (using baseproxy) on port 8788. The user configures their browser to use this proxy, and when attempting to log in to the Sophos Firewall's web admin interface (typically on port 4444), the proxy intercepts and modifies specific POST requests to /webconsole/Controller. It injects a crafted JSON payload that exploits the authentication bypass, potentially granting unauthorized access to the firewall's admin interface. The exploit does not provide a post-exploitation payload but demonstrates the vulnerability by allowing access without valid credentials. The Dockerfile enables easy setup of the required environment. No hardcoded IPs or external domains are present; the main fingerprintable endpoints are the local proxy and the targeted Sophos Firewall path.Keith-amateur · Disclosed Oct 7, 2022 · python · dockerfile · networkPoCCVE-2022-1040This repository provides a proof-of-concept (PoC) exploit for CVE-2022-1040, an authentication bypass vulnerability in the Sophos XG115w Firewall version 17.0.10 MR-10. The exploit consists of two main files: 'CVE-2022-1040.txt', which documents the vulnerability details and provides a sample HTTP POST request to the /webconsole/Controller endpoint, and 'userportal', which contains a similar POST request targeting the /userportal/Controller endpoint. Both files demonstrate how an attacker can craft specific POST requests with manipulated parameters (notably the 'mode' and 'json' fields) to bypass authentication and gain unauthorized access to the firewall's management or user portal interfaces. The README.md provides a brief description and a screenshot reference. No executable code is present; the repository is documentation and PoC request samples for manual exploitation. The attack vector is network-based, requiring access to the firewall's web interfaces.jackson5sec · Disclosed Oct 30, 2022 · http · markdown · networkPoC
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
SophosSfosoperating_system
FAQ

Frequently asked questions

Is CVE-2022-1040 exploited in the wild?
Yes. As of Nov 13, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Mar 31, 2022.
Is there a public exploit for CVE-2022-1040?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2022-1040, the earliest disclosed Oct 7, 2022.
Is there a patch for CVE-2022-1040?
Apply the Sophos hotfix for CVE-2022-1040 and verify that installation succeeded. Automatic hotfix installation is enabled by default; enabled devices check for hotfixes every 30 minutes and after restarting.
What products are affected by CVE-2022-1040?
Sophos Sfos.
How severe is CVE-2022-1040?
CVE-2022-1040 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 99.8% (100th percentile) as of Nov 13, 2026.
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 evidence3Every report linking this CVE to a named adversary.
Associated malware3Malware families linked to this CVE, with evidence and IOCs.
Detection signatures5YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity4Community discussion across Reddit, Mastodon, and other social sources.