
Cloud Vulnerability DB
A community-led vulnerabilities database
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).
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).
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).
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).
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).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."