Severity:

HIGH RISK

(7.3)

SSRF in Vercel AI Provider Utils download-blob

CVE-2026-8768

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Network Perimeter Bypass and Access to Internal Services via SSRF

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A server-side request forgery (SSRF) issue in Vercel AI's provider-utils component allows attackers to abuse the validateDownloadUrl function in packages/provider-utils/src/download-blob.ts to make arbitrary outbound HTTP requests from the server environment.

When an attacker can influence the download URL passed to this function, the application may be tricked into connecting to internal or otherwise restricted endpoints that are not directly accessible from the internet.

Affected context

This vulnerability appears in environments where Vercel AI's provider-utils package is used to download or proxy remote blobs (such as model artifacts, files, or external resources) based on a URL.

The risk emerges when:

  • User-controlled or semi-trusted input is used to construct or pass download URLs, and
  • The validateDownloadUrl logic does not sufficiently restrict destination hosts, protocols, or IP ranges.

In such setups, the affected function effectively turns the application into a network proxy, potentially reaching internal infrastructure that would normally be shielded from external users.

Exploit preconditions

  • Attack surface: Any API route, handler, or background job that calls validateDownloadUrl / download-blob with a URL derived from external input.
  • Required access: Ability to submit or influence URL parameters (e.g., query string, JSON body, headers, or configuration that feeds into the download function). No direct server access is needed.
  • Trigger point: Invocation of the download logic that passes the attacker-supplied URL through validateDownloadUrl, resulting in the server performing the outbound request.
  • Why exploitation is possible: The validation logic does not enforce strict allowlists, scheme checks, or network-level restrictions, allowing attacker-controlled URLs to target arbitrary hosts, including internal IP ranges, metadata endpoints, or sensitive admin services.

Why this happens

The root cause maps to CWE-918: Server-Side Request Forgery (SSRF).

Conceptually, the validateDownloadUrl function is intended to act as a safety gate before performing server-side HTTP requests, but it fails to sufficiently constrain where the server is allowed to connect.

Typical insecure patterns in this class include:

  • Relying on naive string checks (e.g., prefix matching) that can be bypassed via redirects, alternate representations (IPv6, decimal IPs), or subdomain tricks.
  • Omitting checks for private IP ranges, loopback addresses, or cloud provider metadata endpoints.
  • Allowing arbitrary schemes (e.g., file://, gopher://, or custom protocols) or failing to restrict to HTTPS.

As a result, an attacker can supply crafted URLs that pass validation and cause the server to initiate requests to unintended network locations.

Potential impact

  • Access to internal HTTP services that are not directly exposed to the internet (e.g., admin panels, internal APIs, or management endpoints).
  • Interaction with cloud metadata services, which can sometimes allow retrieval of credentials or temporary tokens.
  • Use of the server as a blind or semi-blind port scanner to map internal network topology.
  • Pivoting toward further attacks, such as exploiting vulnerabilities in internal services reachable only from within the network.
  • Data exfiltration from internal endpoints that respond with sensitive information.

General mitigation guidance

Effective mitigation centers on constraining where the server can connect and reducing trust in URL-based input:

  • Implement strict allowlists for outbound destinations: restrict downloads to explicitly approved domains or hostnames controlled by your organization.
  • Enforce protocol and port restrictions: allow only HTTPS (and optionally HTTP) and block all other schemes and unusual ports.
  • Resolve hostnames and enforce network-level restrictions: reject requests to private, loopback, link-local, and multicast address ranges, as well as to known metadata IPs.
  • Normalize and re-validate after redirects: either disallow redirects or apply the same host and network checks to final destinations.
  • Isolate download functionality: run outbound-fetching code in a network-restricted environment (e.g., egress-limited subnet, dedicated proxy) to prevent access to sensitive internal resources.
  • Apply least privilege to any credentials used for outbound calls so that compromise of that channel yields minimal access.

How teams detect issues like this

To identify and monitor this class of vulnerability:

  • Static analysis: Search for functions that accept URLs and make outbound HTTP calls (e.g., fetch, axios, http.request) and verify whether they are guarded by robust validation and allowlists.
  • Code review signals: Treat any use of user-supplied URLs as high risk; check for patterns that only perform superficial string checks or omit IP range validation.
  • Security testing: Use automated SSRF testing tools or custom scripts to probe endpoints that trigger downloads, attempting URLs that target internal addresses or metadata services.
  • Runtime monitoring: Inspect outbound traffic logs for unexpected destinations, unusual ports, or connections to internal IP ranges triggered via public APIs.
  • Policy enforcement: Introduce development guidelines and CI checks that ban direct use of user-controlled URLs for server-side requests without going through a vetted, hardened network client or validation utility.

Sources

SourceLink
gist.github.comgist.github.com/YLChen-007/07d149bd68adbee58165b4207a2abc71
gist.github.comgist.github.com/YLChen-007/cf7e47e4dda392f474ca77a66d1d847f
vuldb.comvuldb.com/submit/811404
vuldb.comvuldb.com/submit/811405
vuldb.comvuldb.com/vuln/364393
vuldb.comvuldb.com/vuln/364393/cti

Frequently asked

questions

Yes. Any remote user who can influence the URL passed into the affected download logic can potentially exploit the SSRF behavior, without needing direct access to the internal network.

The attacker only needs the ability to supply or modify the download URL (for example, via an API parameter, request body, or configuration field). They do not need shell access or privileged credentials on the server.

The safest pattern is to restrict outbound requests to a small, explicit allowlist of trusted domains and enforce strict protocol, port, and IP range checks. All URL parsing and validation should be centralized in a hardened utility that rejects anything outside these constraints.

Treat any use of remote URLs in server-side code as high risk, mandate allowlist-based outbound connection policies, and integrate security review or automated checks for SSRF patterns into your development and CI processes. Network-level egress controls and segmentation provide an additional safety net if application checks fail.

Find out what's already
exploitable in your codebase.