CVE-2025-55173: Image Optimization arbitrary file download vulnerability patched
A vulnerability in Next.js Image Optimization allowed attacker-controlled external image servers to trigger arbitrary file downloads with attacker-defined filenames and content under certain configurations. The issue has been patched in v15.4.5 and v14.2.31 by updating image optimizer logic to avoid misusing upstream Content-Type headers.
Summary
Impact
Resolution
Credit
References
A vulnerability affecting has been addressed. It impacted versions prior to and , and involved a scenario where attacker-controlled external image servers could serve crafted responses that result in arbitrary file downloads with attacker-defined filenames and content.Next.js Image Optimizationv15.4.5v14.2.31
Your Vercel deployments are safe by default. A patch applied on July 29th, 2025 eliminated exposure for all Vercel-hosted customers. Self-hosted deployments should upgrade to v15.4.5 or v14.2.31 to remediate the issue.
Under certain configurations ( or permissive ), a malicious actor could:images.domainsimages.remotePatterns
This issue requires that:
The issue was resolved by updating the image optimizer logic to avoid falling back to the upstream’s header when magic number detection fails. This ensures that responses are only cached when confidently identified as image content and do not mistakenly reuse cache keys for user-specific responses.Content-Type
The fix was included in:
Thanks to for the responsible disclosure.kristianmagas
Trigger the download of a file from a Next.js app with attacker-controlled content and filename
Exploit this behavior for phishing, drive-by downloads, or social engineering scenarios
The target app has external image domains or patterns configured
The remote server is attacker-controlled or attacker-influenced
A user is tricked into clicking a crafted URL
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.
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.
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.
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.