Next.js SSR Prefetch Cache-Poisoning Denial of Service
CVE-2023-46298 affects Next.js versions before 13.4.20-canary.13. During server-side-rendered page prefetching, a request carrying the x-middleware-prefetch header can receive an empty JSON object response. Because the affected responses lack a Cache-Control header, a CDN or other caching layer can cache the empty response and subsequently return it for requests to the same URL, replacing legitimate content and causing denial of service.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
An attacker can poison a shared CDN or caching-layer entry with an empty prefetch response. Users requesting the same URL through that cache may receive the cached empty response rather than the legitimate page content, resulting in denial of service for that URL.
If you can’t patch tonight, do this now.
Configure intermediary CDNs and caching systems not to cache empty SSR prefetch responses, and ensure cache behavior respects response cache-control directives. Purge any affected cached entries if cache poisoning is suspected.
Patch, then assume compromise.
Upgrade Next.js to version 13.4.20-canary.13 or later, which adds Cache-Control protections to the affected SSR responses to prevent caching.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.