CVE-2025-48985
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-48985 is an improper input validation vulnerability in Vercel's AI SDK (ai npm package) that allows unauthenticated users to bypass filetype whitelists when uploading files. It affects all versions of the ai package prior to 5.0.52, and beta versions from 5.1.0-beta.0 through 5.1.0-beta.8. The vulnerability was disclosed on November 7, 2025, via HackerOne and the GitHub Advisory Database. CVSS v3.1 scores range from 3.7 (Low, per HackerOne/CNA) to 5.3 (Medium, per NVD), reflecting differing assessments of attack complexity (Github Advisory, Vercel Changelog).

Technical details

The root cause is classified as CWE-20 (Improper Input Validation) and CWE-682 (Incorrect Calculation), residing in the file download and asset processing logic within packages/ai/src/prompt/convert-to-language-model-prompt.ts. Specifically, the downloadAssets function incorrectly filtered downloaded file results: when an intermediate file in a batch could not be downloaded (returning null), the index-based mapping between planned downloads and results became misaligned, causing subsequent files to be associated with incorrect metadata — potentially allowing a file's media type to be misrepresented and bypass whitelist checks. The fix, applied in commit 930399b, replaces the flawed filter-then-map pattern with a map-then-filter approach that preserves correct index alignment (Github Advisory, GitHub Commit).

Impact

Successful exploitation allows an attacker to upload file types that would normally be rejected by the application's configured filetype whitelist, resulting in a low-integrity impact with no confidentiality or availability consequences. This could enable uploading of executable files, scripts, or other potentially harmful content into systems expecting only specific safe file formats, potentially leading to further compromise depending on how the application processes uploaded files (Vercel Changelog, Github Advisory).

Mitigation and workarounds

Vercel has released patched versions of the ai npm package: 5.0.52 (stable), 5.1.0-beta.9 (beta), and 6.0.0-beta. All users running versions below 5.0.52 or beta versions prior to 5.1.0-beta.9 should upgrade immediately. No configuration-based workaround is available; upgrading to a patched version is the only recommended remediation (Vercel Changelog, Github Advisory).

Community reactions

Vercel published an official changelog entry detailing the vulnerability and fix, encouraging all users to upgrade. The advisory was assigned via HackerOne and reviewed promptly by the GitHub Advisory Database on the same day of disclosure. No notable independent researcher commentary or significant media coverage has been identified beyond standard vulnerability tracking (Vercel Changelog, Github Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-69240CRITICAL9.8
  • JavaScript logoJavaScript
  • sequelize
NoYesAug 03, 2026
CVE-2026-48063CRITICAL9.3
  • JavaScript logoJavaScript
  • openclaw
NoYesAug 03, 2026
CVE-2026-69192HIGH7.7
  • JavaScript logoJavaScript
  • ip-address
NoYesAug 03, 2026
CVE-2026-69198MEDIUM6.9
  • JavaScript logoJavaScript
  • ip-address
NoYesAug 03, 2026
CVE-2026-69207MEDIUM5.3
  • JavaScript logoJavaScript
  • hono
NoYesAug 03, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management