Cache Deception Flaw in SvelteKit And Vercel Stack Exposes User Data
## Cybersecurity: SvelteKit Cache Deception Vulnerability on Vercel
Cybersecurity: SvelteKit Cache Deception Vulnerability on Vercel
A cache deception vulnerability has been identified in SvelteKit applications deployed on Vercel, which exposes sensitive user data to potential attackers. This vulnerability allows publicly cached responses to be authenticated.
SvelteKit, a full-stack JavaScript framework, frequently uses Vercel for deployment. The issue originates from the Vercel adapter in SvelteKit, where the __pathname query parameter can override the request path without validation. This affects paths under /_app/immutable/ , which Vercel caches aggressively using headers like Cache-Control: public, immutable, max-age=31536000 .
Attackers can manipulate logged-in users into visiting a specially crafted URL, such as https://example.vercel.app/_app/immutable/x?__pathname=/api/session . The adapter then rewrites the path to a sensitive endpoint, such as /api/session , retrieves private data using the victim's cookies, and caches it publicly due to the static-like prefix. Subsequently, attackers can request the same URL without cookies to retrieve the data from cache, indicated by X-Vercel-Cache: HIT .
Vercel’s caching rules allow any 200 OK response under /_app/immutable/ to be cacheable, ignoring private content. This can impact any SvelteKit site on Vercel using cookie-based authentication for protected routes, without necessitating changes to the application itself. Additionally, a related vulnerability enables denial-of-service attacks via memory exhaustion in an experimental SvelteKit feature.
CVE/GHSA ID Description
CVE-2026-27118 (GHSA-9pq4-5hcf-288c) Cache deception/poisoning via __pathname parameter in adapter-vercel
A cache deception vulnerability has been identified in SvelteKit applications deployed on Vercel, which exposes sensitive user data to potential attackers.
The patch for this vulnerability is automatically applied for Vercel-hosted applications through platform controls. Users are advised to upgrade @sveltejs/adapter-vercel to version 6.3.2 or higher and use tools like Aikido to rescan repositories.
Timeline Event Date
Discovery and PoC Jan 20, 2026
Disclosure to Vercel Jan 21, 2026
Report Triaged Jan 23, 2026
Fixed and Advisory Published Feb 9, 2026
This vulnerability impacts any SvelteKit site on Vercel with protected routes. The CVSS score of 5.3 reflects the lack of required privileges but necessitates user interaction for successful exploitation. It is crucial to upgrade @sveltejs/adapter-vercel to the latest version to ensure security. Caching layers require careful management to prevent exploitation through simple prefix manipulation.
Based on reporting by GBHackers.
