CVE-2020-12271: SQL Injection in Sophos XG Firewall
- Vendor
- Sophos
CVE-2020-12271 is a SQL injection vulnerability affecting Sophos XG Firewall devices running SFOS 17.0, 17.1, 17.5, and 18.0 before April 25, 2020. Devices exposing the HTTPS administration service or User Portal on the WAN zone were affected. Attackers exploited the vulnerability against the firewall's built-in PostgreSQL database to execute code and install malware, including the Asnarök credential-stealing trojan and backdoors. Exploitation was observed in the wild in April 2020.
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 could result in remote code execution and disclosure of usernames and hashed passwords belonging to local device administrators, portal administrators, and remote-access users. External Active Directory and LDAP passwords were excluded from the described credential exposure. Observed attacks installed credential-stealing malware and backdoors on compromised firewalls. Attackers subsequently attempted to deploy ransomware to internal Windows computers using additional exploits and implants; successful ransomware installation was not confirmed, and Sophos reported that patched firewalls blocked this attack chain.
Mitigation
If you can’t patch tonight, do this now.
Restrict WAN access to the HTTPS administration service and User Portal to reduce exposure while patching. Keep computers behind the firewall updated, particularly against the Windows vulnerabilities used in the subsequent ransomware attack chain. Exposure restrictions and internal-system updates do not replace patching the firewall.
Remediation
Patch, then assume compromise.
Apply the Sophos hotfix for CVE-2020-12271 or vendor security updates that incorporate the fix. Verify that the update was installed, particularly on devices without automatic updates enabled. Sophos distributed the hotfix automatically to firewalls with automatic updates enabled and reported that it removed the attack malware and both backdoor mechanisms.
Exploits
No public exploits tracked yet. Mallory keeps watching.
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.
References
Frequently asked questions
- Is CVE-2020-12271 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
- Is there a public exploit for CVE-2020-12271?
- Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2020-12271.
- Is there a patch for CVE-2020-12271?
- Apply the Sophos hotfix for CVE-2020-12271 or vendor security updates that incorporate the fix. Verify that the update was installed, particularly on devices without automatic updates enabled.
- What products are affected by CVE-2020-12271?
- Sophos Sfos.
- How severe is CVE-2020-12271?
- CVE-2020-12271 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 43.1% (99th percentile) as of Oct 16, 2026.
Recent activity
8 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.