CriticalCVE-2020-12271

    Sophos SFOS SQL Injection Vulnerability (CVE-2020-12271)

    Published In CISA KEV since Sources: CVE.org

    What is affected, what to do

    A SQL injection issue was found in SFOS 17.0, 17.1, 17.5, and 18.0 before 2020-04-25 on Sophos XG Firewall devices, as exploited in the wild in April 2020. This affected devices configured with either the administration (HTTPS) service or the User Portal exposed on the WAN zone. A successful attack may have caused remote code execution that exfiltrated usernames and hashed passwords for the local device admin(s), portal admins, and user accounts used for remote access (but not external Active Directory or LDAP passwords)

    The vulnerability is being actively exploited; treat it as a priority. CISA lists it as used in ransomware campaigns. The available sources name no fixed version. Check the vendor guidance in the references below. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • Sophos Sfos eq 17.0..17.0
    • Sophos Sfos eq 17.1..17.1
    • Sophos Sfos eq 17.5..17.5
    • Sophos Sfos eq 18.0..18.0

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    10.0

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: Vendor (CNA), CVSS v3

    10.0

    CVSS v3

    Severity Critical on the scale from 0 to 10.

    Source: CVE.org

    42.4 %

    EPSS score

    Elevated — model estimates 10-50% exploitation likelihood.

    Source: FIRST EPSS, percentile 98.7

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    252.93 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploited
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    10.0 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    10.0
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    42.4 %
    Elevated — model estimates 10-50% exploitation likelihood.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    98.7
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 4 February 2025
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-89

    Response and mitigation

    Why act now?

    Prioritisation rationale

    This flaw is exploitable over the network without authentication or user interaction and leads to full compromise of a perimeter device. It also leaks admin and VPN credentials that enable follow-on intrusion. CISA flags known ransomware campaign use, and the vulnerability sits among the CVEs most likely to be exploited. The original exploitation wave targeted XG firewalls indiscriminately wherever the admin UI or User Portal faced the WAN. Treat any SFOS instance with WAN exposure and unverified hotfix status as critical and act on it today. Appliances with no WAN exposure and a confirmed hotfix need only credential rotation and a retrospective log review.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Verify hotfix and firmware level: SFOS 17.0, 17.1, 17.5 and 18.0 are affected unless the 2020-04-25 hotfix is applied. Confirm in the admin console and via the device CLI that the hotfix is present. If automatic hotfix installation was disabled, install it now. These branches are outdated, so plan a migration to a currently supported SFOS release. Patch available from the vendor — look up the exact version in the vendor advisory.
      • Remove WAN exposure: Under Administration → Device Access, disable the HTTPS admin service (default TCP 4444) and the User Portal (default TCP 443) for the WAN zone. Restrict admin access to a dedicated management network or VPN.
      • Rotate credentials: Reset passwords for all local device admins, portal admins and local users (SSL/IPsec VPN, User Portal). Also rotate any accounts on other systems (AD, M365, jump hosts) where those passwords were reused. The stolen hashes can be cracked offline.
      • Determine compromise status: Check the Sophos dashboard alert and the hotfix outcome, which reports whether the device was compromised. If it was, treat the appliance as compromised and trigger your incident process, including NIS2 and national CSIRT reporting where applicable.
      • Rebuild compromised devices: Reinstall from trusted, current firmware. Restore configuration only after validating it against a known-good backup.
      • Preserve evidence: Before rebuilding, export admin, web and system logs and, where possible, a filesystem image.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: Expose firewall management only on an out-of-band or management VLAN. Drop inbound TCP 4444 from the internet with an ACL on the upstream router.
      • User Portal restriction: If the portal is business-critical, restrict it to known source ranges via IP or geo allowlist. Alternatively, place it behind VPN or a pre-authenticating reverse proxy.
      • IPS/WAF in front of management services: Enable generic SQL injection signatures (UNION, ' OR, stacked queries, ;--, hex-encoded payloads) for traffic to admin and portal endpoints. Check for and deploy any Suricata/ET rules covering CVE-2020-12271.
      • Egress control for the appliance itself: Restrict outbound connections originating from the firewall to vendor update, NTP and DNS destinations. This blocks exfiltration to attacker infrastructure.
      • IAM hardening: Enforce MFA for admin and VPN access. Move VPN authentication to AD/LDAP or RADIUS where possible (those credentials were not exposed), and minimise local accounts.
      • Automatic hotfixes: Keep "Allow automatic installation of hotfixes" enabled and monitor that setting as part of configuration compliance.
    3. Runbook step 3

      Detection rules

      • Appliance web/admin logs: Look for requests to the admin UI or User Portal from WAN sources that contain SQL metacharacters or keywords. SPL sketch: index=fw sourcetype=sophos:xg (dest_port=4444 OR dest_port=443) (uri_query="*UNION*" OR uri_query="*SELECT*" OR uri_query="*%27*")
      • Network telemetry (Zeek/Suricata): Flag new or unusual outbound HTTP/HTTPS and DNS traffic sourced from the firewall's management IP, especially to newly registered domains. Zeek approach: filter conn.log on id.orig_h == <fw_mgmt_ip> and compare against an allowlist of vendor destinations.
      • Post-exfiltration credential abuse: Watch for VPN or User Portal logins by local accounts from unfamiliar IPs, off-hours sessions, and spikes in failed logins. Correlate Windows Event ID 4624/4625 and 4648 for accounts with likely password reuse.
      • Appliance integrity: Alert on unexpected configuration changes in the admin audit log, such as new admins, modified rules or new device-access exposures. Sigma shape: logsource: product=sophos_xg; detection: action in (admin_created, rule_changed) and src_zone=WAN.
      • Ransomware precursors downstream: Watch for lateral movement from VPN address pools in the days after a suspicious firewall event. Indicators include SMB/RDP fan-out, Sysmon EID 3 connections to many hosts, and Event ID 7045 for new services.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    A SQL injection issue was found in SFOS 17.0, 17.1, 17.5, and 18.0 before 2020-04-25 on Sophos XG Firewall devices, as exploited in the wild in April 2020. This affected devices configured with either the administration (HTTPS) service or the User Portal exposed on the WAN zone. A successful attack may have caused remote code execution that exfiltrated usernames and hashed passwords for the local device admin(s), portal admins, and user accounts used for remote access (but not external Active Directory or LDAP passwords)

    Source: NVD (NIST), cvelistv5, CISA KEV Catalog

    Vendors and products

    Affected operating systems

    Affected operating systems
    Othersophossfos17.0
    Othersophossfos17.1
    Othersophossfos17.5
    Othersophossfos18.0

    Weakness classes (CWE)

    • CWE-89Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

      Base

      The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

      Entry at MITRE CWE-89

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited

    References & sources

    • cwe.mitre.orgdata/definitions/89.htmlx_refsource_MISC, Third-party advisory
    • community.sophos.comkb/en-us/135412x_refsource_MISC, Vendor advisory
    • news.sophos.comen-us/2020/04/26/asnarokx_refsource_MISC, Exploit, Vendor advisory
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2020-12271government-resource, US government resource
    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2020-12271
    <a href="https://intel.neosec.eu/en/cve/CVE-2020-12271"><img src="https://intel.neosec.eu/badge/cve/CVE-2020-12271.svg?lang=en" alt="CVE-2020-12271 – NEOSEC Intel" height="20"></a>