Opennextjs opennextjs-cloudflare
OpenNext Cloudflare: Cache interception can bypass middleware protection for encoded paths
OpenNext Cloudflare is an open Next.js adapter for Cloudflare. From 0.3.0 until 1.20.2, applications that enable enableCacheInterception, rely on middleware for access control, and have a matching cached protected route process encoded pathnames inconsistently between middleware matching and cache lookup. An unauthenticated attacker can use a percent-encoded pathname that does not match authorization middleware but decodes to the cache key of a protected route, causing cached content to be returned without authorization. Malformed encodings can also be partially decoded, allowing cache lookup to continue with a pathname that middleware did not evaluate consistently. This issue is fixed in version 1.20.2.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.3.0, < 1.20.2
Fixed in 1.20.2
Mitigation
Upgrade opennextjs-cloudflare to 1.20.2 or later.
References
- Vendor advisory github.com/opennextjs/opennextjs-cloudflare/se…
- Patch github.com/opennextjs/opennextjs-aws/pull/1199
- Patch github.com/opennextjs/opennextjs-aws/pull/1200
2 more
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.