# Zero Spam for WordPress <= 5.7.11 - Unauthenticated Country Block Bypass via 'CF-IPCountry' and 'X-Forwarded-Country' Headers

- **ID:** WPSEC-2026-0475
- **Plugin:** Zero Spam for WordPress (`zero-spam`), https://wordpress.org/plugins/zero-spam/
- **Affected versions:** from 5.1.2 before 5.7.12
- **Fixed in:** 5.7.12 (Update to 5.7.12 or later.)
- **Severity:** Low 3.7 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N)
- **Weakness:** CWE-348
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-06)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/zero-spam
- **Fix released:** 2026-10-04
- **Published:** 2026-10-06
- **URL:** https://wpsec.com/vuln/WPSEC-2026-0475/

## Description

The Zero Spam for WordPress plugin for WordPress is vulnerable to a country block bypass in versions 5.1.2 up to, and including, 5.7.11. This is due to the plugin taking a visitor's country from the client-supplied 'CF-IPCountry' or 'X-Forwarded-Country' request header whenever no geolocation service returned one, without checking that the request actually came through Cloudflare or a trusted proxy, and, since version 5.7.0, caching that country for the visitor's IP address for a week. This makes it possible for unauthenticated attackers to supply a forged country and evade the site's country blocks on sites whose country detection relies on these headers.

## References

- https://wpsec.com/vuln/WPSEC-2026-0475/
- https://plugins.svn.wordpress.org/zero-spam/tags/5.7.12/
- https://wordpress.org/plugins/zero-spam/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-0475/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
