CVE-2025-48985: Ai Remote Code Execution Vulnerability

LOW
Advisory Identifier: GHSA-rwvc-j5jr-mgvh
CVSS 3.7
CWE-682 CWE-20
Published
Advisory Summary

CVE-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.

CVE-2025-48985 at a Glance

CVE Identifier CVE-2025-48985
GHSA Identifier GHSA-rwvc-j5jr-mgvh
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-682: Incorrect Calculation
Affected Product Ai
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

ai fixed: 5.0.52
npm install ai@5.0.52
ai fixed: 5.1.0-beta.9
npm install ai@5.1.0-beta.9
Verify Direct and Transitive Dependencies

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

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.

CVE-2025-48985 Affected Ai Versions

2 component(s)
Fixed Versions:
5.0.525.1.0-beta.9
Product / Package Ecosystem Affected Versions Fixed Version
ai
npm
< 5.0.52
5.0.52
ai
npm
≥ 5.1.0-beta.0
< 5.1.0-beta.9
5.1.0-beta.9

References

Frequently Asked Questions

What is CVE-2025-48985?
CVE-2025-48985 is a security vulnerability in Ai involving Vercel’s AI SDK's filetype whitelists can be bypassed when uploading files under CWE-682: Incorrect Calculation.
Which Ai versions are affected?
Affected versions include releases prior to 5.0.52, 5.1.0-beta.9 across affected packages: ai.
What version fixes CVE-2025-48985?
Upgrading to 5.0.52, 5.1.0-beta.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ai affected?
Yes, ai is affected in releases prior to 5.0.52, 5.1.0-beta.9. Upgrade your dependency to 5.0.52, 5.1.0-beta.9 or later.
What is the CVSS score of CVE-2025-48985?
CVE-2025-48985 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2025-48985?
CVE-2025-48985 is classified under CWE-682: Incorrect Calculation (The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.).
How can I check npm dependencies for CVE-2025-48985?
Run the dependency tree command: 'npm ls ai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}