WorkThe story, in brief

CVE-2025-48985: Input Validation Bypass on AI SDK

Vercel's AI SDK had a critical flaw. Attackers could swap file content while bypassing validation. Here's what builders need to know.

Illustration of two anonymous hands arranging task cards around an amber tool on a shared desk.
People, judgement and the changing nature of work.AI illustration by KeyNews
The KeyNews take

Why it matters

A low-severity but exploitable vulnerability in Vercel's widely-used AI SDK allowed arbitrary file injection through index misalignment in the prompt conversion pipeline. Developers building with AI SDKs need to understand the attack surface and upgrade immediately.

The key facts

16 to know
  1. CVE-2025-48985: Input validation bypass in Vercel AI SDK

  2. Affects generateText() and streamText() functions

  3. Vulnerability: index misalignment between downloadedFiles array and plannedDownloads array in convert-to-language-model-prompt.ts

  4. Impact: Attackers could substitute arbitrary downloaded bytes for different supported URLs, bypassing URL-based trust and content validation

  5. Severity: Low (but exploitable for content injection)

  6. Fixed in: v5.0.52 and v6.0.0-beta.*

  7. Affects most methods accepting images or files as inputs unless custom validation implemented

  8. Responsibly disclosed by @aphantom

  9. Published: November 6, 2025

  10. Affected versions: pre-5.0.52 and pre-6.0.0-beta

  11. Root cause: Index misalignment in convert-to-language-model-prompt.ts during URL-to-data mapping

  12. Impact: Attackers could bypass filetype whitelists and inject arbitrary content via URL substitution

  13. Affected functions: generateText() and streamText()

  14. Severity: Low (but widespread application impact)

  15. Fix: File mapping implemented before filtering to retain correct index

  16. Workaround available: Custom filetype validation outside SDK

Go to the source

Vercel Blogvercel.com

Publisher excerpt: 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…
Read original report
Back to today's editionMore work news

Keep reading

Related stories

More from Work