CVE-2022-1040
📋 TL;DR
CVE-2022-1040 is an authentication bypass vulnerability in Sophos Firewall's User Portal and Webadmin interfaces that allows remote attackers to execute arbitrary code without valid credentials. This affects Sophos Firewall version v18.5 MR3 and older. Organizations using these vulnerable firewall versions are at risk of complete system compromise.
💻 Affected Systems
- Sophos Firewall
📦 What is this software?
Sfos by Sophos
⚠️ Risk & Real-World Impact
Worst Case
Complete system takeover: attacker gains full administrative control, installs persistent backdoors, exfiltrates sensitive data, and uses the firewall as a pivot point to attack internal networks.
Likely Case
Remote code execution leading to firewall configuration changes, credential theft, network traffic interception, and deployment of malware.
If Mitigated
Limited impact if firewall is patched, isolated from critical networks, and has strict network access controls preventing external exploitation.
🎯 Exploit Status
Multiple public exploit scripts available. Attack requires network access to firewall interfaces but no authentication.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v18.5 MR4 and later
Vendor Advisory: https://www.sophos.com/en-us/security-advisories/sophos-sa-20220325-sfos-rce
Restart Required: Yes
Instructions:
1. Backup current configuration. 2. Download latest firmware from Sophos support portal. 3. Apply update via Webadmin interface. 4. Reboot firewall. 5. Verify update successful.
🔧 Temporary Workarounds
Restrict Network Access
allLimit access to User Portal and Webadmin interfaces to trusted IP addresses only
Disable Unnecessary Interfaces
allDisable User Portal if not required for operations
🧯 If You Can't Patch
- Isolate firewall from internet with strict firewall rules allowing only necessary traffic
- Implement network segmentation to limit potential lateral movement if compromised
🔍 How to Verify
Check if Vulnerable:
Check Sophos Firewall version via Webadmin dashboard or CLI: show system version
Check Version:
show system version
Verify Fix Applied:
Verify version is v18.5 MR4 or newer and test authentication requirements for User Portal/Webadmin
📡 Detection & Monitoring
Log Indicators:
- Failed authentication attempts followed by successful access without valid credentials
- Unusual administrative actions from unexpected IP addresses
- Webadmin/User Portal access from external IPs
Network Indicators:
- HTTP requests to /webconsole/Controller or /userportal/Controller with suspicious parameters
- Unusual outbound connections from firewall
SIEM Query:
source="sophos_firewall" AND (uri="/webconsole/Controller" OR uri="/userportal/Controller") AND status=200 AND auth_failure=0
🔗 References
- http://packetstormsecurity.com/files/168046/Sophos-XG115w-Firewall-17.0.10-MR-10-Authentication-Bypass.html
- https://www.exploit-db.com/exploits/51006
- https://www.sophos.com/en-us/security-advisories/sophos-sa-20220325-sfos-rce
- http://packetstormsecurity.com/files/168046/Sophos-XG115w-Firewall-17.0.10-MR-10-Authentication-Bypass.html
- https://www.exploit-db.com/exploits/51006
- https://www.sophos.com/en-us/security-advisories/sophos-sa-20220325-sfos-rce
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-1040