# CVE-2025-48985: Vercel’s AI SDK's filetype whitelists can be bypassed when uploading files

> Attackers can bypass filetype whitelists during file uploads in the Vercel AI SDK, potentially allowing malicious file execution.

- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Nov 2025
- **Updated:** 1 Dec 2025
- **Also known as:** ECHO-9790-2fa3-84e4, GHSA-rwvc-j5jr-mgvh, MINI-2f7x-49qg-3j3j, MINI-3gx6-g372-w7fr, MINI-7hx3-hxfm-3jg5, MINI-f35c-w682-rr9c, MINI-j35r-rhv7-7cx6, MINI-m3q6-gm92-wqrm, MINI-qr5f-fjr4-ccfj, MINI-x8mx-qfff-gcjc

## What is CVE-2025-48985?

CVE-2025-48985 is a low-severity vulnerability in Vercel AI SDK, published on 7 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A vulnerability in Vercel’s AI SDK has been fixed in versions 5.0.52, 5.1.0-beta.9, and 6.0.0-beta. This issue may have allowed users to bypass filetype whitelists when uploading files. All users are encouraged to upgrade.

More details: https://vercel.com/changelog/cve-2025-48985-input-validation-bypass-on-ai-sdk

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2025-48985?

4 open source packages ship an affected version, including ai. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ai` | npm | All versions | 5.0.52 |
| `ai` | npm | All versions | 5.0.52 |
| `ai` | npm | From 5.1.0-beta.0 | 5.1.0-beta.9 |
| `ai` | npm | From 5.1.0-beta.0 | 5.1.0-beta.9 |

Products: Vercel Ai.

## How do I fix CVE-2025-48985?

Upgrade ai to a fixed version for your release line: 5.0.52 or 5.1.0-beta.9.

## Is CVE-2025-48985 being exploited?

There is no known exploitation of CVE-2025-48985 in the wild and no public exploit code.

## Other vulnerabilities in Vercel AI SDK

- [CVE-2026-8768](https://insights.sbomify.com/CVE-2026-8768/): vercel ai provider-utils download-blob.ts validateDownloadUrl server-side request forgery (medium 6.9)
- [CVE-2026-8769](https://insights.sbomify.com/CVE-2026-8769/): vercel ai provider-utils response-handler.ts createJsonErrorResponseHandler resource consumption (medium 5.3)
- [CVE-2026-8767](https://insights.sbomify.com/CVE-2026-8767/): vercel ai PR Branch Name Interpolation prettier-on-automerge.yml run os command injection (low 2.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-48985 and fix it if it is affected.

What it is: CVE-2025-48985 is a low-severity vulnerability in Vercel AI SDK, published on 7 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-48985 in the wild and no public exploit code.

Affected packages and fixed versions:
- ai (npm): affected all versions; fixed in 5.0.52
- ai (npm): affected all versions; fixed in 5.0.52
- ai (npm): affected from 5.1.0-beta.0; fixed in 5.1.0-beta.9
- ai (npm): affected from 5.1.0-beta.0; fixed in 5.1.0-beta.9

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-48985/ (Markdown: https://insights.sbomify.com/CVE-2025-48985/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-48985
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-48985
- OSV: https://osv.dev/vulnerability/CVE-2025-48985

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-48985/
Summaries are generated and may contain mistakes; the official description above is the record.
