{"schema":"threatline.record/2","record":{"id":"CVE-2026-100409","aliases":["GHSA-2vc4-c4r6-p6v6"],"summary":"OpenNext Cloudflare: Cache interception can bypass middleware protection for encoded paths","details":"## Summary\n\nWhen cache interception is enabled, `@opennextjs/cloudflare` can interpret percent-encoded paths differently during middleware matching and cache lookup.\n\nAn 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.\n\n`enableCacheInterception` is disabled by default.\n\n## Impact\n\nA remote unauthenticated attacker may retrieve cached content from routes intended to be protected by middleware.\n\nAn application is affected when it:\n\n- explicitly enables `enableCacheInterception`;\n- relies on middleware for access control; and\n- has a matching cached route.\n\n## Details\n\nMiddleware matching previously used the encoded request pathname, while cache interception decoded the pathname before selecting a cache entry.\n\nFor example, consider an application with:\n\n- middleware matcher `/admin/:path*`;\n- middleware returning `401 Authentication required` for `/admin`;\n- a statically generated, cached `/admin` route; and\n- cache interception enabled:\n\n```ts\nexport default defineCloudflareConfig({\n  incrementalCache: staticAssetsIncrementalCache,\n  enableCacheInterception: true,\n});\n```\n\nAn attacker can request:\n\n```http\nGET /%61dmin\n```\n\nThe 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:\n\n```http\nHTTP/1.1 200 OK\nx-opennext-cache: HIT\n\nProtected content\n```\n\nMalformed paths exposed an additional inconsistency. For example:\n\n```http\nGET /%61dmin/%ZZ\n```\n\nThe 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.\n\n## Patches\n\nThe 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](https://github.com/opennextjs/opennextjs-aws/pull/1199) and [opennextjs-aws#1200](https://github.com/opennextjs/opennextjs-aws/pull/1200).\n\nUsers should upgrade to `@opennextjs/cloudflare@1.20.2` or later.\n\n## Workarounds\n\nIf upgrading is not immediately possible for an application:\n\n1. Disable cache interception by removing `enableCacheInterception: true`.\n2. Enforce authorization inside protected route handlers rather than relying exclusively on middleware.\n3. Reject encoded paths for protected routes at a trusted proxy before they reach the Worker.\n\nAdding individual encoded matcher variants is not a complete workaround because pathnames can have multiple equivalent encodings.","categories":["Libraries & packages"],"product":"@opennextjs/cloudflare","vendor":"opennextjs","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-2vc4-c4r6-p6v6","source_modified_at":"2026-10-15T20:15:20Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@opennextjs/cloudflare"},"range":">= 0.3.0, < 1.20.2"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-100409","source_modified_at":"2026-10-15T17:50:33.255Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"opennextjs-cloudflare","vendor":"opennextjs","versions":[{"status":"affected","version":">= 0.3.0, < 1.20.2"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-2vc4-c4r6-p6v6","source_modified_at":"2026-10-15T20:30:05.349670038Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@opennextjs/cloudflare","ecosystem":"npm","purl":"pkg:npm/%40opennextjs/cloudflare"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.0"},{"fixed":"1.20.2"}]}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-2vc4-c4r6-p6v6","source_modified_at":"2026-10-15T20:15:20Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@opennextjs/cloudflare"},"version":"1.20.2"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-2vc4-c4r6-p6v6","source_modified_at":"2026-10-15T20:30:05.349670038Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@opennextjs/cloudflare","ecosystem":"npm","purl":"pkg:npm/%40opennextjs/cloudflare"},"version":"1.20.2"}],"cvss":7.5,"severity":"High","kev":{"listed":false},"epss":{"probability":0.00305,"percentile":0.22131,"score_date":"2026-10-23"},"published_at":"2026-10-15T16:57:50.999Z","modified_at":"2026-10-15T20:30:05.349670038Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-2vc4-c4r6-p6v6","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-15T20:15:20Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-100409","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-15T17:50:33.255Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-2vc4-c4r6-p6v6","fetched_at":"2026-10-23T18:55:00.935475Z","source_modified_at":"2026-10-15T20:30:05.349670038Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-100409","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/opennextjs/opennextjs-cloudflare/security/advisories/GHSA-2vc4-c4r6-p6v6","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-100409","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/opennextjs/opennextjs-aws/pull/1199","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/opennextjs/opennextjs-aws/pull/1200","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/opennextjs/opennextjs-cloudflare/commit/38ea40b669be272ddf09a7df7e70c69d0b57404b","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/opennextjs/opennextjs-cloudflare/releases/tag/@opennextjs/cloudflare@1.20.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-2vc4-c4r6-p6v6","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"partial","assessed_at":"2026-10-15T17:50:22.601978Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-15T20:30:05.349670038Z","content_hash":"d1cd3f77121623aee699894f29c396f6494f03ea8f1596dc5a27c521ec2fb294"}}
