Vulnerabilities in pkg:npm/ai
PACKAGECVE-2025-48985 is a LOW (CVSS 3.7) remote code execution vulnerability (CWE-682: Incorrect Calculation) affecting Ai libraries in the npm ecosystem. The issue involves vercel’s ai sdk's filetype whitelists can be bypassed when uploading files. Remediation is available by upgrading affected packages to version 5.0.52, 5.1.0-beta.9.
pkg:npm/ai
Vulnerability advisories affecting package pkg:npm/ai. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-rwvc-j5jr-mgvh | CVE-2025-48985 | LOW | Vercel’s AI SDK's filetype whitelists can be bypassed when uploading files |
CVE-2025-48985 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2025-48985
To remediate this vulnerability, upgrade all affected Ai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install ai@5.0.52
npm install ai@5.1.0-beta.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ai
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-48985, inspect your project dependencies using npm:
npm ls ai
Analyze the terminal output to locate any version of Ai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.52), your application is affected.
Note: The npm ls ai command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-682: Incorrect Calculation, where the product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management. In Ai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-48985 Affected Ai Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2025-48985?
Which Ai versions are affected?
What version fixes CVE-2025-48985?
Is ai affected?
What is the CVSS score of CVE-2025-48985?
What CWE is associated with CVE-2025-48985?
How can I check npm dependencies for CVE-2025-48985?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rwvc-j5jr-mgvh",
"modified" : "2025-12-02T01:27:15Z",
"published" : "2025-11-07T03:30:25Z",
"aliases" : [ "CVE-2025-48985" ],
"summary" : "Vercel’s AI SDK's filetype whitelists can be bypassed when uploading files",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.52"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.1.0-beta.0"
}, {
"fixed" : "5.1.0-beta.9"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48985"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/ai/issues/8881"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/ai/commit/930399bb9839a8baf3d349614106d78268775eed"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/ai"
}, {
"type" : "WEB",
"url" : "https://vercel.com/changelog/cve-2025-48985-input-validation-bypass-on-ai-sdk"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-682" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-07T17:39:01Z",
"nvd_published_at" : "2025-11-07T01:15:36Z"
}
}