# CVE-2025-6704: Sophos Firewall SPX file write leads to pre-auth RCE

An arbitrary file write in Sophos Firewall's Secure PDF eXchange (SPX) feature can give unauthenticated code execution, but only with a specific SPX setup on a High Availability pair. Fixed by hotfix since June 2025; no exploitation or public PoC found.

- Vendor: Sophos, Sophos Firewall Secure PDF eXchange (SPX)
- Severity: CRITICAL (CVSS 3.1 9.8)
- Exploited (CISA KEV): not listed
- EPSS: 11.8% on 2026-12-02
- Public exploit: none reported
- Patch available: yes
- Vendor advisory: sophos-sa-20250721-sfos-rce, https://www.sophos.com/en-us/security-advisories/sophos-sa-20250721-sfos-rce
- Published: 2025-07-21; updated: 2026-10-23
- Page: https://patchtonight.com/cve/CVE-2025-6704/

## Affected and fixed versions

| Affected | Fixed in |
| --- | --- |
| Sophos Firewall 21.5 GA (21.5.0) and older, with SPX configured and High Availability (HA) enabled | Hotfix for your version (see the table in "What to do"), or 21.0 MR2 (21.0.2) and later |

## What it is

Sophos Firewall's **Secure PDF eXchange (SPX)** feature has an arbitrary file write flaw. Sophos says it can lead to **pre-authentication remote code execution**. An attacker needs no account and no user interaction. The CVE record rates it CVSS 9.8.

The bug only matters in a narrow setup: **a specific SPX configuration, on a firewall running in High Availability (HA) mode**. Sophos estimates this covers about 0.05% of devices. The advisory doesn't say which SPX settings make a device exposed.

Sophos found it through its bug bounty program and says it has not seen exploitation. We found no public proof of concept and no reports of attacks. CISA's KEV catalog does not list it (PatchTonight's copy, 2026.10.21). EPSS is 12% (96th percentile) as of 2026-10-22, so it is scored as more likely than most CVEs to be exploited. That score is a prediction, not a sighting. It was published together with CVE-2025-7624, CVE-2025-7382 and two 2024 CVEs in the same advisory.

## Am I affected?

You're affected if **all** of these are true:

1. You run Sophos Firewall **21.5 GA (21.5.0) or older** without the hotfix.
2. SPX is enabled with the vulnerable configuration (Sophos doesn't publish the details).
3. The firewall runs in **HA mode**.

If you don't use SPX or don't run HA, you're outside the stated conditions. Check SPX settings anyway if you can't confirm the hotfix.

Sophos says remediation needs no action if **Allow automatic installation of hotfixes** is enabled. That is the default. Sophos points to KBA-000010589 for confirming the hotfix is installed. We couldn't open that article, so check it directly.

## What to do

1. **Confirm the hotfix is installed.** Auto-install is on by default, so most devices already have it. Use KBA-000010589 to verify.
2. **If auto-install is off, install the hotfix or upgrade.** The fix is in 21.0 MR2 (21.0.2) and later. Hotfixes from the advisory:

| Version | Hotfix build | Published |
| --- | --- | --- |
| 19.0 MR2 | 19.0.2.472 | 2025-06-24 |
| 20.0 MR2 | 20.0.2.378 | 2025-06-24 |
| 20.0 MR3 | 20.0.3.427 | 2025-06-24 |
| 21.0 GA | 21.0.0.169 | 2025-06-24 |
| 21.0 MR1 | 21.0.1.237 | 2025-07-01 |
| 21.0 MR1-1 | 21.0.1.272 | 2025-07-01 |
| 21.0 MR1-2 | 21.0.1.277 | 2025-06-24 |
| 21.5 GA | 21.5.0.171 | 2025-06-24 |

3. **There is no workaround.** The advisory says none exists. Don't count on disabling SPX unless you've confirmed the fix is in place.
4. **Run a supported version.** Sophos says users of older versions must upgrade to get the fixes.
5. **Check HA pairs.** Make sure both members carry the hotfix.

No exploitation is known, so there's no specific hunt to run. If a device was unpatched with SPX and HA enabled, review it as you would any internet-facing firewall.

## Detection

No indicators of compromise have been published and Sophos hasn't described log artifacts. Until that changes, there is nothing specific to search for.

Practical checks:

- Confirm the hotfix state on every firewall, including HA auxiliary devices.
- Review administrator and configuration changes, and unexpected reboots or failovers, on any unpatched HA firewall with SPX enabled.
- Watch the [Sophos advisory](https://www.sophos.com/en-us/security-advisories/sophos-sa-20250721-sfos-rce) and the [CISA KEV catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) for a change in exploitation status.

## Sources

- [Sophos advisory sophos-sa-20250721-sfos-rce](https://www.sophos.com/en-us/security-advisories/sophos-sa-20250721-sfos-rce)
- [CVE record](https://cveawg.mitre.org/api/cve/CVE-2025-6704)
- [SOCRadar CVE Radar (no IOCs listed)](https://socradar.io/free-tools/cve-radar/CVE-2025-6704)

---

Data from PatchTonight (https://patchtonight.com), compiled from vendor advisories, CISA KEV and FIRST EPSS. Please credit PatchTonight and link to the CVE page when you use it.
