CVE-2025-6704 Command injection in Sophos Firewall

Critical 9.8 Published Updated

Attackers can achieve remote code execution via arbitrary file writing in the Secure PDF eXchange feature when High Availability mode is enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-6704?

CVE-2025-6704 is a critical command injection vulnerability in Sophos Firewall, published on 21 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-78

Which versions are affected by CVE-2025-6704?

It affects 1 product.

Products include Sophos Firewall Firmware.

How do I fix CVE-2025-6704?

No fix has been published for CVE-2025-6704 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2025-6704 being exploited?

There is no known exploitation of CVE-2025-6704 in the wild and no public exploit code.

Sources

Also known as GHSA-5m7h-7mwc-924h.

Is CVE-2025-6704 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free