@opennextjs/cloudflare
Affected
- introduced
0.3.0, fixed1.20.2(semver)
Fixed versions
1.20.2
Fix
- Fixed version
1.20.2npm install @opennextjs/[email protected]
Advisory
Also known as: CVE-2026-100409
OpenNext Cloudflare: Cache interception can bypass middleware protection for encoded paths
Summary
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.
Impact
A remote unauthenticated attacker may retrieve cached content from routes intended to be protected by middleware.
An application is affected when it:
enableCacheInterception;Details
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:
/admin/:path*;401 Authentication required for /admin;/admin route; andexport default defineCloudflareConfig({
incrementalCache: staticAssetsIncrementalCache,
enableCacheInterception: true,
});
An attacker can request:
GET /%61dmin
The 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 content
Malformed paths exposed an additional inconsistency. For example:
GET /%61dmin/%ZZ
The 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.
Patches
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/[email protected] or later.
Workarounds
If upgrading is not immediately possible for an application:
enableCacheInterception: true.Adding individual encoded matcher variants is not a complete workaround because pathnames can have multiple equivalent encodings.
High Basis: The source's own band: HIGH
0.3.0, fixed 1.20.2 (semver)1.20.2
1.20.2npm install @opennextjs/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0