Skip to content

IP Restriction bypass possible when site content is cached (e.g. via CDN)

Low
peterwilsoncc published GHSA-jfqv-gvp2-qq5f Aug 27, 2026

Package

Restricted Site Access (WordPress)

Affected versions

<= 7.5.3

Patched versions

7.6.0

Description

Description

When using the IP restriction feature on a site that leverages caching, particularly via a CDN or other server-side cache that sits in front of WordPress, it’s possible for restricted users to view cached content even when their IP is not allowed.

This occurs because requests from disallowed IPs may never reach WordPress, meaning the plugin cannot execute and restrict access. Instead, the user is served a cached version of the content generated by a previously allowed IP. This represents a security loophole, especially for sites relying on IP-based access control as a protective measure.

Expected Behavior

If IP restriction is enabled and caching is detected, the plugin should:

  1. Warn the admin that IP-based access control may be unreliable due to active caching.
  2. Optionally disable the IP restriction toggle in the settings UI unless a bypass is explicitly enabled.

Proposed Solution

✅ Step 1: Detect Caching

  • Reuse or extend existing caching detection logic (e.g. for Batcache, opcache, WPEngine, Pantheon, or CDN headers).

  • If caching is detected:

    • Set a flag internally (e.g. ip_protection_cache_conflict = true).

✅ Step 2: Display Admin Warning

  • Display a prominent warning in the plugin settings:

    "IP-based access control may not function as expected because site-level or CDN caching is active. Requests from disallowed IPs may still be served cached content."

  • If possible, indicate what caching system was detected (e.g. "CDN Detected: Cloudflare" or "Page cache plugin active: WP Super Cache").

✅ Step 3: Disable IP Protection Setting (Optional)

  • Disable the IP protection toggle by default if caching is detected.

  • Allow enabling via:

    • A filter:

      add_filter( 'rsa_enable_ip_restriction_with_cache', '__return_true' );
    • Or a "danger zone" UI toggle in the settings with explicit messaging:

      "I understand the risks of using IP restriction with caching and want to enable it anyway."

Relevant Background

  • Prior versions of the plugin have shown warnings for Batcache or OPcache being enabled when access restriction could be affected.
  • This is an extension of that logic to cover CDN and full-page caching scenarios that happen before WordPress is bootstrapped.

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

CVE ID

No known CVE

Weaknesses

No CWEs

Credits