# CVE-2025-7624: Sophos Firewall SQL injection to RCE in the legacy SMTP proxy

An SQL injection in the legacy transparent SMTP proxy of Sophos Firewall can give unauthenticated code execution, but only on upgraded devices with an email quarantine policy. Sophos has seen no exploitation, it isn't in CISA KEV, and no public PoC was found.

- Vendor: Sophos, Sophos Firewall (legacy SMTP proxy)
- Severity: CRITICAL (CVSS 3.1 9.8)
- Exploited (CISA KEV): not listed
- EPSS: 10.5% 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-7624/

## Affected and fixed versions

| Affected | Fixed in |
| --- | --- |
| Sophos Firewall 21.5 GA (21.5.0) and older, only with an active email quarantine policy and an upgrade from a version older than 21.0 GA | Hotfix for your version (automatic by default), or 21.0 MR2 (21.0.2) or later |

## What it is

CVE-2025-7624 is an **SQL injection in the legacy (transparent) SMTP proxy** of Sophos Firewall. It can lead to remote code execution, with no login and no user interaction (CVSS 9.8).

It is narrower than the score suggests. Sophos says the flaw is only reachable when **an email quarantine policy is active** and the firewall was **upgraded from a version older than 21.0 GA**. Sophos puts the exposure at **at most 0.73% of devices**.

Sophos has not seen exploitation, and it isn't in CISA KEV as of catalog 2026.10.21. We found no public proof of concept. EPSS has risen to 11% (96th percentile) as of 2026-10-22, so treat it as one to close out rather than ignore.

The same advisory fixes four other flaws: CVE-2025-6704 (critical, SPX file write, needs HA), CVE-2025-7382 (WebAdmin command injection, needs OTP for admins), CVE-2024-13974 and CVE-2024-13973.

## Am I affected?

You're exposed if all of these are true:

1. **Sophos Firewall is 21.5 GA (21.5.0) or older** and has no hotfix.
2. **An email quarantine policy is active** in the legacy SMTP proxy.
3. **The firewall was upgraded** from a version older than 21.0 GA.

Sophos says hotfixes install automatically where **Allow automatic installation of hotfixes** is enabled, which is the default on remediated versions. Sophos points to KBA-000010589 for confirming the hotfix is applied. We couldn't open it, so check it directly.

## What to do

1. **Confirm the fix is in place.** If automatic hotfix installation is on, Sophos says no action is needed. Verify with KBA-000010589.
2. **If automatic hotfixes are off,** install the hotfix for your version. Sophos published them for these builds:
   - 19.0 MR2 (19.0.2.472)
   - 20.0 MR2 (20.0.2.378) and 20.0 MR3 (20.0.3.427)
   - 21.0 GA (21.0.0.169)
   - 21.0 MR1 (21.0.1.237), MR1-1 (21.0.1.272) and MR1-2 (21.0.1.277)
   - 21.5 GA (21.5.0.171)
3. **Older versions need an upgrade.** The fix is in **21.0 MR2 (21.0.2) and later**. Check your version is still supported using Sophos KB-000035279.
4. **Workarounds:** Sophos lists none.
5. **If you were exposed and unpatched,** there is no published sign of attacks. Review the firewall as below, and rebuild it and rotate its stored credentials if you find anything.

## Detection

No indicators of compromise have been published for this CVE, and Sophos says it has not seen exploitation.

- Look for unexpected admin accounts, config changes or firmware changes on firewalls that had an email quarantine policy and were unpatched.
- Review traffic from the firewall to unfamiliar hosts, and inbound SMTP to the firewall from unexpected sources.
- Follow Sophos's own guidance if you suspect compromise. We found no vendor-published log queries for this flaw.

## Sources

- [Sophos advisory sophos-sa-20250721-sfos-rce](https://www.sophos.com/en-us/security-advisories/sophos-sa-20250721-sfos-rce)
- [CVE record CVE-2025-7624](https://cveawg.mitre.org/api/cve/CVE-2025-7624)

---

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.
