megachangelog
Security15.4.5, 14.2.31

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

Read more

  • 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

securitycveimage-optimizationcachenext.js

Source: original entry ↗

More from Vercel

Follow Vercel to get its new changes in your feed and email digest.

Feature

OpenAI Decisions API now available on AI Gateway

OpenAI's Decisions API is now accessible through Vercel's AI Gateway with an OpenAI-compatible endpoint, enabling decision models to answer typed questions and return probabilities, choices, and scores for routing, triage, and guardrails use cases. Support is available across the OpenAI SDK, AI SDK, HTTP API, and CLI with the latest versions.

ai-gatewayopenaiapidecisionssdks
Feature

Timestamp attributes now supported in Vercel Flags

Vercel Flags now supports timestamp attributes for entities, allowing you to create time-based targeting rules. Use this feature to run limited-time campaigns, show content between specific dates, or target users based on registration date.

flagstargetingfeaturetimestampscampaigns
Feature

Glyph Cluster now available in stealth on AI Gateway

Glyph Cluster, a reasoning model for coding and long-context analysis, is now available as a stealth model on Vercel's AI Gateway for Pro and Enterprise plan teams with purchased AI Gateway credits at no cost during the stealth period. The model supports function calling, streams responses, and can be accessed via AI SDK, OpenAI-compatible APIs, and coding agents.

ai-gatewaymodelscodingstealth
See all Vercel changes →