PoC Monitor
← All CVEs
CVE-2022-1040published 25 Mar 2022 12:10 UTCData: JSON · API

Sophos Firewall

Sophos Firewall Authentication Bypass Vulnerability

Edge device · Firewall / VPNknown edge product: Sophos Sophos Firewall Sophos Firewall Authentication Bypass (high confidence)

An authentication bypass vulnerability in the User Portal and Webadmin allows a remote attacker to execute code in Sophos Firewall version v18.5 MR3 and older.

First public PoC 42 daysafter publication · 6 May 2022
Public PoCs86 on GitHub · 2 Exploit-DB, Metasploit or nuclei
CVSS9.8critical · scored by CNA · CWE-noinfo
CISA KEV 31 Mar 20226 days after publication

Timeline

Days relative to CVE publication
t=0+7+14+21+28+35+42CVE published25 Mar 2022 · t = 0Added to CISA KEV31 Mar 2022 · t+6dFirst public PoC6 May 2022 · t+42d

First public PoC 42 days after publication; added to CISA KEV 6 days after publication. First PoC: killvxk/CVE-2022-1040 (created 6 May 2022, found by us: backfilled).

PoC repositories

Found on GitHub.

6 PoCs · 6 pending

PoCs 6
RepositoryCreatedStarsAssessment
killvxk/CVE-2022-1040 6 May 2022 +42 d 16 PoC via PoC Index
jam620/Sophos-Vulnerability 25 Sep 2022 +184 d 18 PoC
Keith-amateur/cve-2022-1040 7 Oct 2022 +196 d 3 PoC
michealadams30/CVE-2022-1040 8 Jan 2023 +289 d 0 PoC via PoC Index
Cyb3rEnthusiast/CVE-2022-1040 26 Sep 2023 +1.5 y 1 PoC
Flags · score 15
  • owner account created less than 30 days before the repo

Below the suspicion threshold (50); does not change the assessment.

xMr110/CVE-2022-1040 5 Feb 2024 +1.9 y 0 PoC
Pending 6
RepositoryCreatedStarsAssessment
jackson5sec/CVE-2022-1040 30 Oct 2022 +219 d 3 Pending · repository exceeds size limit via PoC Index
APTIRAN/CVE-2022-1040 unknown 0 Pending · repository unavailable (HTTP 404)
Seatwe/CVE-2022-1040-rce unknown 0 Pending · repository unavailable (HTTP 404)
XmasSnowISBACK/CVE-2022-1040 unknown 0 Pending · repository unavailable (HTTP 404)
cve-hunter/CVE-2022-1040-RCE unknown 0 Pending · repository unavailable (HTTP 404)
cve-hunter/CVE-2022-1040-sophos-rce unknown 0 Pending · repository unavailable (HTTP 404)

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.
SourceTitlePublishedFound by us
Exploit-DBSophos XG115w Firewall 17.0.10 MR-10 - Authentication Bypass2 Sep 202214 Nov 2026
nuclei templatenuclei template: Sophos Firewall <=18.5 MR3 - Remote Code Executionunknown14 Nov 2026

PoC characteristics

What to hunt for in your logs · from 7 PoC repos

POST /webconsole/Controller

Key headers
Accept: text/plain, */*; q=0.01 Accept-Language: en-US,en;q=0.5 Cookie: JSESSIONID=c893loesu9tnlvkq53hy1jiq103 Origin: https://127.0.0.1:4444 Referer: https://127.0.0.1:4444/webconsole/webpages/login.jsp Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin Te: trailers X-Requested-With: XMLHttpRequest
Body markers
mode=151 json= __RequestType=ajax t=1653896534066 json={"username":"admin","password":"somethingnotpassword","languageid":"1","browser":"Chrome_101","accessaction":1, "mode\u0000ef":716} in application/x-www-form-urlencoded
Ports
4444
PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Seen in
3 repos: jam620/Sophos-Vulnerability, michealadams30/CVE-2022-1040, xMr110/CVE-2022-1040
Evidence
jam620/Sophos-Vulnerability/README.md:14 michealadams30/CVE-2022-1040/xploit:15 xMr110/CVE-2022-1040/CVE-2022-1040.md:15 xMr110/CVE-2022-1040/CVE-2022-1040.md:33

POST /userportal/Controller

Query
mode=8700 operation=1 datagrid=179 json=\
Key headers
X-Requested-With: XMLHttpRequest
Ports
4444
Seen in
2 repos: jam620/Sophos-Vulnerability, killvxk/CVE-2022-1040
Evidence
jam620/Sophos-Vulnerability/README.md:81 killvxk/CVE-2022-1040/README.md:8

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /webconsole/Controller
(?i)^/webconsole/Controller(?:[?#].*)?$
POST /userportal/Controller
(?i)^/userportal/Controller\?(?:.*&)?mode=8700.*operation=1.*datagrid=179.*json=\\

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /webconsole/Controller
alert http any any -> $HOME_NET [4444] (msg:"GG PoC-Monitor CVE-2022-1040 Sophos Sophos Firewall exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/webconsole/Controller"; http.header; content:"Accept: text/plain, */*|3b| q=0.01"; nocase; http.header; content:"Accept-Language: en-US,en|3b|q=0.5"; nocase; http.header; content:"Cookie: JSESSIONID=c893loesu9tnlvkq53hy1jiq103"; nocase; http.header; content:"Origin: https://127.0.0.1:4444"; nocase; http.header; content:"Referer: https://127.0.0.1:4444/webconsole/webpages/login.jsp"; nocase; http.header; content:"Sec-Fetch-Dest: empty"; nocase; http.header; content:"Sec-Fetch-Mode: cors"; nocase; http.header; content:"Sec-Fetch-Site: same-origin"; nocase; http.header; content:"Te: trailers"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; http.request_body; content:"mode=151"; http.request_body; content:"json="; http.request_body; content:"__RequestType=ajax"; http.request_body; content:"t=1653896534066"; http.request_body; content:"json={|22|username|22|:|22|admin|22|,|22|password|22|:|22|somethingnotpassword|22|,|22|languageid|22|:|22|1|22|,|22|browser|22|:|22|Chrome_101|22|,|22|accessaction|22|:1, |22|mode|5c|u0000ef|22|:716}"; reference:url,poc.griffinguard.io/cve/CVE-2022-1040; classtype:web-application-attack; sid:9049275; rev:1;)
POST /userportal/Controller
alert http any any -> $HOME_NET [4444] (msg:"GG PoC-Monitor CVE-2022-1040 Sophos Sophos Firewall exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/userportal/Controller"; http.uri; content:"mode=8700"; http.uri; content:"operation=1"; http.uri; content:"datagrid=179"; http.uri; content:"json=|5c|"; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2022-1040; classtype:web-application-attack; sid:9534229; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /webconsole/Controller
title: Sophos Sophos Firewall exploit attempt (CVE-2022-1040)
id: gg-pocmon-cve-2022-1040-9049275
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-1040. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-1040
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/webconsole/Controller'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.1040
POST /userportal/Controller
title: Sophos Sophos Firewall exploit attempt (CVE-2022-1040)
id: gg-pocmon-cve-2022-1040-9534229
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-1040. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-1040
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/userportal/Controller'
    cs-uri-query|contains|all:
      - 'mode=8700'
      - 'operation=1'
      - 'datagrid=179'
      - 'json=\'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.1040