Skip to main content
Vulnerability Database/CVE-2026-100409

CVE-2026-100409: OpenNext Cloudflare Auth Bypass Vulnerability

CVE-2026-100409 is an authentication bypass flaw in OpenNext Cloudflare adapter that allows unauthenticated attackers to access protected cached content using encoded pathnames. This article covers the technical details, affected versions from 0.3.0 to 1.20.2, security impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-100409 Overview

CVE-2026-100409 is an authorization bypass vulnerability in OpenNext Cloudflare, an open-source Next.js adapter for Cloudflare. The flaw affects versions 0.3.0 through 1.20.1 when applications enable enableCacheInterception, rely on middleware for access control, and expose cached protected routes. The adapter decodes pathnames inconsistently between middleware matching and cache lookup. An unauthenticated attacker can request a percent-encoded pathname that bypasses authorization middleware but decodes to the cache key of a protected route. The adapter then returns cached content without authorization. The issue is tracked as [CWE-177: Improper Handling of URL Encoding (Hex Encoding)] and was fixed in version 1.20.2.

Critical Impact

Unauthenticated remote attackers can retrieve cached content from protected routes by sending percent-encoded or malformed URL paths that evade middleware access controls.

Affected Products

  • @opennextjs/cloudflare versions 0.3.0 through 1.20.1
  • Next.js applications deployed on Cloudflare using the OpenNext adapter
  • Deployments that enable enableCacheInterception with middleware-based access control

Discovery Timeline

  • 2026-10-15 - CVE-2026-100409 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-100409

Vulnerability Analysis

The vulnerability stems from a path normalization mismatch between two pipeline stages in the OpenNext Cloudflare adapter. Middleware evaluates the raw request pathname for authorization decisions. The cache interception layer, however, applies partial or full percent-decoding before computing the cache key. Attackers exploit this gap to reach cached responses that middleware was supposed to protect.

For example, a middleware rule guarding /admin will not match the encoded path /%61dmin. The cache lookup logic decodes the segment and resolves it to the /admin cache entry. The server then returns the protected response without ever enforcing authorization. Malformed encodings such as /%ZZ can also be partially decoded, extending the bypass to otherwise invalid inputs.

Root Cause

The root cause is inconsistent URL encoding handling across request processing stages, classified as [CWE-177]. The middleware matcher compares the pathname as received, while the cache key normalization performs decoding. Any encoded character in a protected path segment produces divergent interpretations between the two layers, breaking the authorization contract.

Attack Vector

Exploitation requires only network access to the deployed application. No authentication, user interaction, or elevated privileges are needed. The attacker sends a crafted HTTP request with a percent-encoded or malformed path targeting a known protected route.

The patch introduces a test case that models the exploit conditions and adjusts the middleware to consistently handle encoded paths:

typescript
// Patched middleware demonstrating encoded path handling
export function middleware(request: NextRequest, event: NextFetchEvent) {
	console.log("middleware");
	if (request.nextUrl.pathname.startsWith("/admin")) {
		return new NextResponse("Authentication required", { status: 401 });
	}
	if (request.nextUrl.pathname === "/encoded-m%69ddleware") {
		return new NextResponse("Middleware matched encoded path");
	}
	if (request.nextUrl.pathname === "/about") {
		return NextResponse.redirect(new URL("/redirected", request.url));
	}
}

Source: GitHub Commit 38ea40b

The test fixture confirms the adapter now generates static params covering malformed encodings like %ZZ:

text
export function generateStaticParams() {
	return [{ slug: ["admin", "%ZZ"] }];
}

export default async function CatchAllPage({ params }: { params: Promise<{ slug: string[] }> }) {
	const { slug } = await params;
	return <h1>Protected content: {slug.join("/")}</h1>;
}

Source: GitHub Commit 38ea40b

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-100409

Indicators of Compromise

  • HTTP access logs containing percent-encoded characters within paths that match protected routes, such as /%61dmin or /admin%2F.
  • Requests to malformed-encoding paths such as /%ZZ or sequences that result in partial decoding at the cache layer.
  • Unauthenticated requests returning HTTP 200 responses for routes expected to require authentication.

Detection Strategies

  • Review Cloudflare and application logs for anomalous encoded path segments targeting routes governed by middleware authorization.
  • Correlate 200-status responses against expected 401/403 responses for known protected prefixes.
  • Compare enableCacheInterception configuration with middleware matchers to identify routes exposed to the bypass pattern.

Monitoring Recommendations

  • Instrument middleware with structured logging that records the raw pathname and the resolved cache key for comparison.
  • Alert on first-seen percent-encoded path variants for authenticated routes.
  • Baseline request path distributions and flag spikes in encoded or malformed URL inputs.

How to Mitigate CVE-2026-100409

Immediate Actions Required

  • Upgrade @opennextjs/cloudflare to version 1.20.2 or later across all deployments.
  • Audit middleware configuration for routes that combine enableCacheInterception with authorization checks.
  • Invalidate cached entries for sensitive routes to clear any poisoned or improperly served responses.

Patch Information

The fix is included in @opennextjs/cloudflare@1.20.2. Technical details are documented in GHSA-2vc4-c4r6-p6v6, with upstream changes tracked in Pull Request #1199 and Pull Request #1200. Review the patch commit for the specific encoding normalization logic.

Workarounds

  • Disable enableCacheInterception until the upgrade is applied, accepting the performance tradeoff.
  • Enforce authorization at the origin or within the route handler itself rather than relying solely on middleware matching.
  • Deploy a Cloudflare Worker or WAF rule that rejects requests containing percent-encoded sequences in paths targeting protected prefixes.
bash
# Upgrade the adapter to the patched release
npm install @opennextjs/cloudflare@1.20.2

# Verify the installed version
npm ls @opennextjs/cloudflare

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.