Server-side Request Forgery (SSRF) Affecting ai package, versions *


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.05% (14th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-AI-16734889
  • published18 May 2026
  • disclosed18 May 2026
  • creditEric-f

Introduced: 18 May 2026

NewCVE-2026-8768  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

There is no fixed version for ai.

Overview

ai is an AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) due to the order of operations in the validateDownloadUrl() implementation in download-blob.ts and download.ts. The fetch() operation called before applying validateDownloadUrl() follows redirects by default. This open redirect response is blocked by the SSRF protection such that it never makes it back to the application or the attacker, but the request made to the redirect target may still succeed, allowing operations on or disruption of internal resources.

PoC

curl -X POST http://127.0.0.1:3000/api/chat \
  -H "Content-Type: application/json" \
  -d '{"imageUrl": "http://httpbin.org/redirect-to?url=http%3A%2F%2F127.0.0.1%3A8560%2Fsecret_metadata"}'

CVSS Base Scores

version 4.0
version 3.1