CVE-2025-48985: Input Validation Bypass in AI SDK
A low-severity vulnerability in Vercel's AI SDK allowed attackers to bypass filetype whitelists and inject arbitrary content by manipulating URL-to-data mapping in the prompt conversion pipeline. This has been patched in versions 5.0.52 and 6.0.0-beta.
A low-severity in Vercel's AI SDK was responsibly disclosed, and has been fixed for 5.0.52, 6.0.0-beta.* The issue may have allowed users to bypass filetype whitelists when uploading files. security vulnerability
Vercel customers are encouraged to upgrade to the latest version. Read more details below.
Vulnerability in Vercel's AI SDK prompt conversion pipeline where improper URL-to-data mapping allows attackers to substitute arbitrary downloaded bytes for different supported URLs within the same prompt. The vulnerability occurs in the file when filtering downloaded results could cause index misalignment between the downloadedFiles array and the original plannedDownloads array.convert-to-language-model-prompt.ts
When processing mixed supported and unsupported URLs, the filtering operation removes null entries for supported URLs, causing the remaining downloaded data to be incorrectly associated with different URL keys. This results in bytes from an unsupported URL being mapped to a supported URL slot, allowing attackers to inject arbitrary content while bypassing URL-based trust and content validation mechanisms.
This affects most methods that accepted images or files as inputs, unless explicit data validation was implemented outside of the SDK. Namely the and functions.generateText()streamText()
The issue was resolved by mapping files before filtering out empty ones to retain the correct index in:
Thanks to @aphantom for responsible disclosure.
Summary
Impact
Resolution
Workarounds
Credit
References
5.0.52
6.0.0-beta.*
Implementing custom filetype validation logic outside of the SDK.
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.