CVE-2025-6704: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Sophos Sophos Firewall
An arbitrary file writing vulnerability in the Secure PDF eXchange (SPX) feature of Sophos Firewall versions older than 21.0 MR2 (21.0.2) can lead to pre-auth remote code execution, if a specific configuration of SPX is enabled in combination with the firewall running in High Availability (HA) mode.
AI Analysis
Technical Summary
CVE-2025-6704 is a critical vulnerability identified in Sophos Firewall products prior to version 21.0 MR2 (21.0.2). The flaw exists in the Secure PDF eXchange (SPX) feature, which, when configured in a specific manner and combined with the firewall operating in High Availability (HA) mode, allows an unauthenticated remote attacker to perform arbitrary file writes. This vulnerability stems from improper neutralization of special elements in OS commands (CWE-78), commonly known as OS Command Injection. Exploiting this vulnerability enables an attacker to execute arbitrary code on the affected firewall device without requiring any authentication or user interaction. The CVSS v3.1 base score of 9.8 reflects the critical nature of this issue, indicating high impact on confidentiality, integrity, and availability, with low attack complexity and no privileges or user interaction required. The vulnerability could allow attackers to compromise the firewall, potentially gaining control over network traffic filtering and monitoring, leading to severe consequences such as data exfiltration, network disruption, or lateral movement within the protected network. Although no known exploits are currently reported in the wild, the severity and ease of exploitation make it a significant threat that demands immediate attention from organizations using affected Sophos Firewall versions. The lack of available patches at the time of reporting further increases the urgency for mitigation through configuration changes or temporary workarounds until an official fix is released.
Potential Impact
For European organizations, the impact of CVE-2025-6704 is substantial due to the critical role Sophos Firewall devices play in network security infrastructure. Successful exploitation could lead to full compromise of the firewall, undermining perimeter defenses and exposing sensitive data, including personal data protected under GDPR. This could result in regulatory penalties, reputational damage, and operational disruptions. Organizations relying on HA configurations for redundancy and high availability are particularly at risk, as the vulnerability specifically requires HA mode to be enabled alongside the SPX feature. Given the widespread use of Sophos Firewall in various sectors such as finance, healthcare, government, and critical infrastructure across Europe, the potential for large-scale impact is significant. Attackers could leverage this vulnerability to bypass security controls, intercept or manipulate traffic, and establish persistent footholds within corporate networks. The criticality of the vulnerability also raises concerns about targeted attacks by advanced threat actors aiming to disrupt European organizations or steal sensitive information.
Mitigation Recommendations
Immediate mitigation steps include disabling the Secure PDF eXchange (SPX) feature if it is not essential, especially in environments where High Availability mode is enabled. Organizations should review their firewall configurations to identify if the vulnerable SPX configuration is active and consider temporarily disabling HA mode if feasible until a patch is available. Network segmentation and strict access controls should be enforced to limit exposure of management interfaces to untrusted networks. Monitoring firewall logs for unusual activity related to SPX or HA operations can help detect attempted exploitation. Additionally, organizations should subscribe to Sophos security advisories to promptly apply patches once released. Employing intrusion detection/prevention systems (IDS/IPS) to detect anomalous command injection patterns targeting the firewall can provide an additional layer of defense. Finally, conducting internal audits and penetration tests focusing on firewall configurations can help identify and remediate potential weaknesses proactively.
Affected Countries
Germany, United Kingdom, France, Netherlands, Italy, Spain, Sweden, Belgium, Poland, Switzerland
CVE-2025-6704: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Sophos Sophos Firewall
Description
An arbitrary file writing vulnerability in the Secure PDF eXchange (SPX) feature of Sophos Firewall versions older than 21.0 MR2 (21.0.2) can lead to pre-auth remote code execution, if a specific configuration of SPX is enabled in combination with the firewall running in High Availability (HA) mode.
AI-Powered Analysis
Technical Analysis
CVE-2025-6704 is a critical vulnerability identified in Sophos Firewall products prior to version 21.0 MR2 (21.0.2). The flaw exists in the Secure PDF eXchange (SPX) feature, which, when configured in a specific manner and combined with the firewall operating in High Availability (HA) mode, allows an unauthenticated remote attacker to perform arbitrary file writes. This vulnerability stems from improper neutralization of special elements in OS commands (CWE-78), commonly known as OS Command Injection. Exploiting this vulnerability enables an attacker to execute arbitrary code on the affected firewall device without requiring any authentication or user interaction. The CVSS v3.1 base score of 9.8 reflects the critical nature of this issue, indicating high impact on confidentiality, integrity, and availability, with low attack complexity and no privileges or user interaction required. The vulnerability could allow attackers to compromise the firewall, potentially gaining control over network traffic filtering and monitoring, leading to severe consequences such as data exfiltration, network disruption, or lateral movement within the protected network. Although no known exploits are currently reported in the wild, the severity and ease of exploitation make it a significant threat that demands immediate attention from organizations using affected Sophos Firewall versions. The lack of available patches at the time of reporting further increases the urgency for mitigation through configuration changes or temporary workarounds until an official fix is released.
Potential Impact
For European organizations, the impact of CVE-2025-6704 is substantial due to the critical role Sophos Firewall devices play in network security infrastructure. Successful exploitation could lead to full compromise of the firewall, undermining perimeter defenses and exposing sensitive data, including personal data protected under GDPR. This could result in regulatory penalties, reputational damage, and operational disruptions. Organizations relying on HA configurations for redundancy and high availability are particularly at risk, as the vulnerability specifically requires HA mode to be enabled alongside the SPX feature. Given the widespread use of Sophos Firewall in various sectors such as finance, healthcare, government, and critical infrastructure across Europe, the potential for large-scale impact is significant. Attackers could leverage this vulnerability to bypass security controls, intercept or manipulate traffic, and establish persistent footholds within corporate networks. The criticality of the vulnerability also raises concerns about targeted attacks by advanced threat actors aiming to disrupt European organizations or steal sensitive information.
Mitigation Recommendations
Immediate mitigation steps include disabling the Secure PDF eXchange (SPX) feature if it is not essential, especially in environments where High Availability mode is enabled. Organizations should review their firewall configurations to identify if the vulnerable SPX configuration is active and consider temporarily disabling HA mode if feasible until a patch is available. Network segmentation and strict access controls should be enforced to limit exposure of management interfaces to untrusted networks. Monitoring firewall logs for unusual activity related to SPX or HA operations can help detect attempted exploitation. Additionally, organizations should subscribe to Sophos security advisories to promptly apply patches once released. Employing intrusion detection/prevention systems (IDS/IPS) to detect anomalous command injection patterns targeting the firewall can provide an additional layer of defense. Finally, conducting internal audits and penetration tests focusing on firewall configurations can help identify and remediate potential weaknesses proactively.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Sophos
- Date Reserved
- 2025-06-26T09:41:20.790Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 687e4119a83201eaac0fbb97
Added to database: 7/21/2025, 1:31:05 PM
Last enriched: 7/21/2025, 1:46:34 PM
Last updated: 9/4/2025, 2:40:30 AM
Views: 33
Related Threats
CVE-2025-38603
LowCVE-2025-58313: CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in Huawei HarmonyOS
MediumCVE-2025-58296: CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in Huawei HarmonyOS
HighCVE-2025-3698: CWE-749 Exposed Dangerous Method or Function in TECNO com.transsion.carlcare
HighCVE-2025-1298: CWE-290 Authentication Bypass by Spoofing in TECNO com.transsion.carlcare
CriticalActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.