/

CVE-2026-63086

Severity:

HIGH RISK

(8.6)

Server-Side Request Forgery (CWE-918) in TGI API

CVE-2026-63086

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Internal network access and potential credential exposure via SSRF

Severity:

HIGH RISK

(8.6)

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 issue in text-generation-inference's OpenAI-compatible multimodal chat endpoint allows crafted image_url values to make the server perform arbitrary HTTP GET requests.

When exposed to untrusted clients, this becomes risky because unauthenticated attackers can abuse the model API to reach internal services, cloud metadata endpoints, and perform internal port scanning or credential theft.

Affected context

This vulnerability occurs in deployments of text-generation-inference that:

  • Expose the OpenAI-compatible multimodal chat completions endpoint to untrusted or semi-trusted clients
  • Allow user-controlled image_url parameters to be fetched by the backend
  • Run within network environments that have access to internal services or cloud metadata endpoints

In such contexts, the model-serving node effectively acts as a proxy, and insufficient validation of target addresses allows attackers to pivot from the public API into more sensitive network zones.

Exploit preconditions

  • Attack surface: The OpenAI-compatible multimodal chat completions HTTP endpoint exposed by text-generation-inference.
  • Required access: Network access to the API; no authentication is required in vulnerable configurations.
  • Trigger point: Submission of a chat request containing a crafted image_url field that the backend attempts to fetch.
  • Why exploitation is possible:
  • The fetch_image function does not restrict private, loopback, link-local, or metadata service addresses.
  • The reqwest client follows HTTP redirects by default, enabling attackers to start with an allowed scheme/host and then redirect to internal targets.
  • There is no robust allowlist or network boundary check before performing outbound requests on behalf of the user.

Why this happens

The underlying bug aligns with CWE-918: Server-Side Request Forgery (SSRF), where a server-side component makes outbound requests based on user-controlled input without sufficient validation.

In this case, the multimodal chat endpoint treats image_url values as trusted locations, and the fetch_image function directly passes them to an HTTP client that:

  • Lacks restrictions on address ranges (e.g., RFC1918, loopback, link-local, and metadata IPs)
  • Follows redirects, allowing indirect navigation from benign-looking URLs to internal resources

Abstractly, the insecure pattern is "backend-as-proxy" behavior: a network-privileged service accepts arbitrary destination URLs from users and forwards them, granting attackers visibility and reach that they would not have directly from their own network position.

Potential impact

  • May allow internal port scanning of services reachable from the text-generation-inference host.
  • Could enable access to cloud provider instance-metadata endpoints, potentially leaking credentials or configuration secrets.
  • Can facilitate probing and enumeration of internal HTTP-based management or monitoring interfaces.
  • May be leveraged as a stepping stone in lateral movement, helping attackers map internal network topology and identify additional targets.

General mitigation guidance

Effective mitigation focuses on constraining where the backend can connect on behalf of users and reducing the trust placed in user-supplied URLs.

Common defensive patterns include:

  • Implement strict validation and allowlisting of outbound destinations, such as only permitting publicly routable HTTPS endpoints and disallowing private, loopback, link-local, and metadata address ranges.
  • Enforce URL scheme and hostname checks server-side, independent of redirect behavior, and block redirects to disallowed networks or hosts.
  • Decouple model-serving components from sensitive network zones so that even if SSRF occurs, reachable internal services are minimized.
  • Apply least-privilege principles to cloud roles and instance metadata access, ensuring that any exposed credentials are narrowly scoped and cannot lead to broad compromise.
  • Treat media-fetching utilities (like fetch_image) as untrusted entry points and design them to fail closed when encountering ambiguous or internal destinations.

How teams detect issues like this

Organizations can detect SSRF risks and potential abuse by combining code-level and operational controls:

  • Static analysis rules or linters that flag patterns where user-controlled URLs are passed directly to HTTP clients without address-range validation or allowlisting.
  • Code review practices that scrutinize "proxy-like" behavior, focusing on functions that fetch external resources (images, webhooks, callbacks) from user-supplied locations.
  • Runtime monitoring of outbound HTTP traffic from model-serving nodes, looking for suspicious requests to internal IP ranges, loopback addresses, and cloud metadata endpoints.
  • Policy enforcement in CI/CD pipelines to require explicit destination validation for any new network calls added to API handlers, complemented by automated scanning tools integrated into pull requests.

Sources

SourceLink
github.comgithub.com/geo-chen/oss/blob/main/text-generation-inference.md
vulncheck.comvulncheck.com/advisories/text-generation-inference-ssrf-via-fetch-image-in-multimodal-chat-completions

Frequently asked

questions

Yes. In typical deployments where the multimodal chat endpoint is exposed over the network, an attacker can send crafted requests remotely. Exploitation does not require physical access to the host and, in many cases, also does not require authentication.

The attacker only needs the ability to reach the text-generation-inference API over the network. If the endpoint is publicly or broadly accessible and does not enforce strict authentication, any external client can attempt exploitation using controlled image_url values.

The safest fix pattern is to treat user-controlled URLs as untrusted and apply a deny-by-default model to outbound requests. This typically means implementing strict allowlists for permitted domains or networks, blocking private and metadata address ranges, preventing unsafe redirects to internal targets, and limiting the backend's network privileges.

Prevention relies on architectural and coding discipline: design APIs so that backend services do not act as general-purpose proxies; validate and constrain any user-supplied network destinations; monitor outbound traffic from privileged services; and embed SSRF-focused checks into code review and automated scanning so new endpoints cannot introduce unvalidated outbound calls.

Find out what's already
exploitable in your codebase.