Security patch for Next.js Image Optimization cache poisoning (CVE-2025-57752)
A cache poisoning vulnerability in Next.js Image Optimization allowed sensitive image responses from API routes to be cached and served to unauthorized users when images varied based on headers like Cookie or Authorization. This issue has been resolved in versions 15.4.5 and 14.2.31.
Summary
Impact
Resolution
Credit
References
A vulnerability affecting has been addressed. It impacted versions prior to and , and involved a cache poisoning issue that caused sensitive image responses from API routes to be cached and subsequently served to unauthorized users.Next.js Image Optimizationv15.4.5v14.2.31
Vercel deployments were never impacted by this vulnerability.
When API routes are used to return image content that varies based on headers (e.g., , ), and those images are passed through Next.js Image Optimization, the optimized image may be cached without including those request headers as part of the cache key. This can lead to:CookieAuthorization
This issue arises without user interaction and requires no elevated privileges, only a prior authorized request to populate the cache.
The issue was resolved by ensuring request headers aren’t forwarded to the request that is proxied to the image endpoint. This ensures that the image endpoint cannot be used to serve images that require authorization data and thus cannot be cached.
Fix available in:
Thanks to for the responsible disclosure.reddounsf
of user-specific or protected image contentUnauthorized disclosure
of conditional content via CDN or internal cacheCross-user leakage
Next.js v15.4.5
Next.js v14.2.31
Source: original entry ↗
More from Vercel
Follow Vercel to get its new changes in your feed and email digest.
Updates to Hobby and Pro Terms of Service
Vercel is updating Terms of Service for Hobby and Pro customers effective October 19, 2026, clarifying credit policies, managed accounts, auto-renewal practices, and adding statutory cancellation and refund rights for UK and EU consumers, including protections for service changes with negative impact.
Mercury 3 now available on AI Gateway
Inception's Mercury 3 model is now available on Vercel's AI Gateway with 50% launch pricing and generation speeds exceeding 1,000 tokens per second. The model enables parallel text refinement with a 1M-token context window, ideal for real-time applications like browser agents and customer support.
MiniMax M3.1 Flash now available on AI Gateway for free
MiniMax M3.1 Flash, an open-weight multimodal model with 1M-token context window for coding and agentic work, is now available on Vercel's AI Gateway at no cost through October 20. The model excels at complex agent tasks, coding applications, and cybersecurity work, and can be used through multiple APIs and coding agents.