Loading advisory.
Loading advisory.
OpenNext Cloudflare: Cache interception can bypass middleware protection for encoded paths
When cache interception is enabled, @opennextjs/cloudflare can interpret percent-encoded paths differently during middleware matching and cache lookup.
Published 2026-10-15 16:57 UTC · Modified 2026-10-15 20:30 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| @opennextjs/cloudflare | npm | >= 0.3.0, < 1.20.2 | 1.20.2 | npm install @opennextjs/cloudflare@1.20.2 |
When cache interception is enabled, @opennextjs/cloudflare can interpret percent-encoded paths differently during middleware matching and cache lookup.
An encoded request may fail to match authorization middleware, then be decoded into the cache key of a protected route. The cached response may consequently be returned without invoking the middleware.
enableCacheInterception is disabled by default.
A remote unauthenticated attacker may retrieve cached content from routes intended to be protected by middleware.
An application is affected when it:
explicitly enables enableCacheInterception;
relies on middleware for access control; and
has a matching cached route.
Middleware matching previously used the encoded request pathname, while cache interception decoded the pathname before selecting a cache entry.
For example, consider an application with:
middleware matcher /admin/:path*;
middleware returning 401 Authentication required for /admin;
a statically generated, cached /admin route; and
cache interception enabled:
export default defineCloudflareConfig({
incrementalCache: staticAssetsIncrementalCache,
enableCacheInterception: true,
});An attacker can request:
GET /%61dminThe encoded pathname does not match /admin/:path*, so the authorization middleware is not invoked. Cache interception then decodes %61dmin to admin and may return the cached /admin response:
HTTP/1.1 200 OK
x-opennext-cache: HIT
Protected contentMalformed paths exposed an additional inconsistency. For example:
GET /%61dmin/%ZZThe previous implementation decoded each segment independently. It decoded %61dmin to admin but retained the malformed %ZZ segment, allowing cache lookup to continue using a partially decoded pathname.
The fix aligns encoded-path handling across middleware matching and cache lookup, and rejects malformed paths instead of partially decoding them. See the upstream fixes in opennextjs-aws#1199 and opennextjs-aws#1200.
Users should upgrade to @opennextjs/cloudflare@1.20.2 or later.
If upgrading is not immediately possible for an application:
Disable cache interception by removing enableCacheInterception: true.
Enforce authorization inside protected route handlers rather than relying exclusively on middleware.
Reject encoded paths for protected routes at a trusted proxy before they reach the Worker.
Adding individual encoded matcher variants is not a complete workaround because pathnames can have multiple equivalent encodings.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.005 on 2026-11-24 to 0.007 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.005 | first score | v2026.06.15 |
| 2026-11-26 | 0.007 | 0.005 | v2026.06.15 |