Vercel AI Provider-Utils Server-Side Request Forgery Vulnerability

Vulnerability

A server-side request forgery (SSRF) vulnerability has been identified in the Vercel AI SDK, specifically in the '@ai-sdk/provider-utils' package, all versions prior to 3.0.97. The issue arises in the 'validateDownloadUrl' function within 'packages/provider-utils/src/download-blob.ts'. This vulnerability allows remote attackers to bypass URL validation and redirect requests to internal resources, exploiting a time-of-check to time-of-use (TOCTOU) logic error. Although the SDK includes a post-redirect validation step, it occurs too late to prevent the initial request from reaching internal services.

Impact

Exploitation of this vulnerability allows for blind SSRF attacks, where internal network resources can be accessed without authorization. While the response from the internal service cannot be read due to the SDK's error handling, the request has already been processed, potentially triggering state changes or actions on internal microservices or administrative APIs.

Reproduction

To reproduce this vulnerability, upload an image URL that points to an external server controlled by the attacker. The server should respond with a 302 redirect to an internal IP address. The 'fetch' request will follow the redirect, bypassing the SSRF protection and accessing the internal resource.

Added: May 17, 2026, 11:19 PM
Updated: May 17, 2026, 11:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.4
exploitability
8.2
remediation
0.0
relevance
8.6
threat
6.4
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.