ZeroHour
Security Affairspublished ()ingested @securityaffairs

Sophos fixed critical vulnerabilities in its Firewall product

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2020-12271
SQL Injection RCE in Sophos SFOS Firewalls with WAN-Exposed Admin or User Portal

CVE-2020-12271 is a SQL injection flaw (CWE-89) in the Sophos firewall operating system (SFOS) firmware that runs Sophos's firewall appliances. It is triggered when the appliance's administration (HTTPS) service or its User Portal is exposed on the WAN (internet-facing) zone, which lets remote attackers inject SQL through those services and achieve code execution on the device. Successful exploitation gives attackers remote code execution that can be used to exfiltrate usernames and hashed passwords for local device administrators, portal administrators, and user accounts used for remote access; passwords stored in external Active Directory or LDAP directories are not exposed. Affected organizations are those running Sophos SFOS with the HTTPS admin interface or User Portal reachable from the internet; the source data does not specify affected version ranges, so defenders should consult Sophos's advisories for affected and fixed releases. Exploitation is confirmed in the wild: CISA added the flaw to the Known Exploited Vulnerabilities catalog on 2021-11-03 with known ransomware use, EPSS estimates a 42.4% probability of exploitation in the next 30 days (99th percentile), and no public proof-of-concept is known.

Do: Immediately update SFOS to a current patched release per Sophos's upgrade instructions, which is CISA's required action for federal agencies. As an interim mitigation, remove the HTTPS administration service and User Portal from the WAN zone or restrict access to trusted source addresses. Because ransomware actors are known to exploit this flaw, review firewall logs for signs of intrusion and rotate local device-admin, portal-admin, and remote-access user credentials, as only those hashes could have been exfiltrated (external AD/LDAP passwords were not at risk).

9.842% KEV ransomware PoC
  • Sophos SFOS (Sophos firewall operating system)
largetens of thousands (order of magnitude 10,000-100,000) of internet-exposed Sophos firewall admin/portal services
CVE-2024-12727
+2 in the same advisory: …12728 …12729
A pre-auth SQL injection vulnerability in the email protection feature of Sophos Firewall versions older than 21.0 MR1 (21.0.1) allows access to the reporting d

A pre-auth SQL injection vulnerability in the email protection feature of Sophos Firewall versions older than 21.0 MR1 (21.0.1) allows access to the reporting database and can lead to remote code execution if a specific configuration of Secure PDF eXchange (SPX) is enabled in combination with the firewall running in High Availability (HA) mode.

NVD description · AI analysis pending
9.8
group max
1%
  • sophos firewall firmware
Full article662 words · extracted from securityaffairs.com · click to collapse

Pierluigi Paganini December 20, 2024

Sophos fixed three Sophos Firewall flaws that could lead to SQL injection, privileged SSH access to devices, and remote code execution.

Sophos has addressed three vulnerabilities, respectively tracked as CVE-2024-12727, CVE-2024-12728, and CVE-2024-12729, in its Sophos Firewall solution.

The vulnerabilities impact Sophos Firewall v21.0 GA (21.0.0) and older versions, below are the description for these issues:

  • CVE-2024-12727 (CVSS score 9.8) – The vulnerability is a pre-auth SQL injection issue in Sophos Firewall’s email protection, it could enable remote code execution if SPX is enabled with HA mode. The cybersecurity firm states that the issue affects ~0.05% of devices.
  • CVE-2024-12728 (CVSS score 9.8) – The vulnerability is a non-random SSH passphrase for HA cluster setup on Sophos Firewall that remained active post-setup, risking privileged account exposure on ~0.5% of devices.
  • CVE-2024-12729 (CVSS score 8.8) – The vulnerability is a post-auth code injection issue in the User Portal that allows authenticated users to execute code remotely in Sophos Firewall older than version 21.0 MR1 (21.0.1).

“Sophos has resolved three independent security vulnerabilities in Sophos Firewall.” reads the advisory. “No action is required for Sophos Firewall customers with the “Allow automatic installation of hotfixes” feature enabled on remediated versions (see Remediation section below). Enabled is the default setting.””

To mitigate CVE-2024-12728, restrict SSH to the dedicated HA link and use a strong, random passphrase. For CVE-2024-12729, avoid exposing User Portal and Webadmin to WAN.

The company is not aware of attacks in the wild exploiting these vulnerabilities.

Early this month, the U.S. charged the Chinese national Guan Tianfeng (aka gbigmao and gxiaomao) for hacking thousands of Sophos firewall devices worldwide in 2020.

Tianfeng worked at Sichuan Silence Information Technology Co., faces charges for developing and testing a zero-day exploit used to compromise approximately 81,000 firewalls.

The man and co-conspirators exploited a zero-day vulnerability, tracked as CVE-2020-12271, in Sophos firewalls to deploy malware. The malware stole data and encrypted files to block remediation attempts.

At the end of April 2020, cybersecurity firm Sophos released an emergency patch to address an SQL injection zero-day vulnerability affecting its XG Firewall product that has been exploited in the wild.

Sophos was informed of the attacks exploiting the zero-day issue by one of its customers on April 22, 2020. The customer noticed “a suspicious field value visible in the management interface.”

Sophos investigated the incident and determined that hackers targeted systems configured with either the administration (HTTPS service) or the User Portal exposed on the WAN zone.

The attackers exploited an SQL injection zero-day vulnerability to gain access to exposed XG devices.

“The attack used a previously unknown SQL injection vulnerability to gain access to exposed XG devices.” reads the advisory published by Sophos.

“It was designed to download payloads intended to exfiltrate XG Firewall-resident data. The data for any specific firewall depends upon the specific configuration and may include usernames and hashed passwords for the local device admin(s), portal admins, and user accounts used for remote access.” “Passwords associated with external authentication systems such as AD or LDAP are unaffected. At this time, there is no indication that the attack accessed anything on the local networks behind any impacted XG Firewall.”

The hackers exploited the SQL injection flaw to download malicious code on the device that was designed to steal files from the XG Firewall.

Hackers exploited the issue to install the Asnarök Trojan that allowed the attackers to steal files from the XG Firewall and use the stolen info to compromise the network remotely.

The Trojan could steal sensitive data including usernames and hashed passwords for the firewall device admin, and user accounts used for remote access. Login credentials associated with external authentication systems (i.e. AD, LDAP) are not impacted by the flaw.

Weeks later, the experts observed a new wave of attacks where hackers exploited the issue to distribute the Ragnarok Ransomware.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Firewall)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/172179/security/sophos-firewall-critical-vulnerabilities.html