/

CVE-2026-35486

Severity:

HIGH RISK

(7.5)

SSRF in text-generation-webui RAG Extensions

CVE-2026-35486

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Exposure of Internal Services and Cloud Metadata via SSRF

Severity:

HIGH RISK

(7.5)

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

The superbooga and superboogav2 RAG extensions in text-generation-webui perform server-side HTTP requests to user-supplied URLs without any validation or restriction.

An attacker can leverage this behavior to make the server fetch arbitrary internal or cloud endpoints, potentially exposing cloud metadata, IAM credentials, or other internal resources, which are then passed back through the RAG pipeline.

Affected context

This vulnerability appears in deployments using the superbooga or superboogav2 RAG extensions in text-generation-webui where:

  • The application accepts user-provided URLs as part of a retrieval or augmentation workflow.
  • The backend has network access to internal services (e.g., VPC networks, internal APIs, databases) or cloud metadata endpoints.
  • There is no network egress control or isolation limiting what the application server can reach.

In these architectures, the server effectively becomes a proxy for user-controlled requests into otherwise non-public network zones.

Exploit preconditions

  • Attack surface: HTTP(S) interface of text-generation-webui with superbooga or superboogav2 RAG enabled.
  • Required access: Ability to supply or influence the URL consumed by the RAG extensions (e.g., via the web UI, API, or prompt parameters).
  • Trigger point: Invocation of a RAG workflow that calls requests.get() on the supplied URL.
  • Why exploitation is possible: The implementation forwards user-controlled URLs directly into requests.get() with:
  • No scheme validation (e.g., http, https, potential custom or local schemes if supported by the HTTP stack).
  • No IP filtering or CIDR blocking for internal or link-local addresses (e.g., 169.254.169.254).
  • No hostname allowlist or denylist to restrict reachable domains.

Why this happens

The root cause is an unvalidated server-side HTTP request to user-controlled URLs, a classic Server-Side Request Forgery (SSRF) pattern.

The RAG extensions treat user input as a trusted URL and forward it directly to requests.get() without enforcing any constraints on scheme, destination IP/hostname, or network zone.

This maps to CWE-918: Server-Side Request Forgery (SSRF), where an attacker abuses a backend component with broader network reach than the attacker to access internal or otherwise restricted resources.

Potential impact

  • Access to cloud instance metadata endpoints, which may expose:
  • Temporary IAM credentials
  • Access tokens and identity documents
  • Configuration data about the compute environment
  • Discovery and probing of internal services (e.g., internal APIs, databases, admin panels) not directly reachable from the internet.
  • Exfiltration of sensitive internal responses through the RAG pipeline output back to the attacker.
  • Facilitation of further attacks, such as pivoting within a cloud environment using stolen credentials.
  • Information disclosure that may support later privilege escalation or lateral movement.

General mitigation guidance

Effective mitigation generally focuses on restricting where server-side HTTP requests can be sent and minimizing what the server can see and return:

  • Enforce strict allowlists for outbound URLs/domains used by RAG workflows; only permit known, external, and trusted hosts.
  • Block internal and link-local address ranges (e.g., RFC1918, 169.254.0.0/16, 127.0.0.0/8, ::1, and private IPv6 ranges) at the application and/or network layer.
  • Validate schemes so only https (and where necessary http) are allowed; reject uncommon or dangerous schemes.
  • Apply least-privilege networking by placing the application in an egress-restricted network segment that cannot reach metadata or sensitive internal services.
  • Minimize credential exposure by using scoped IAM roles and not relying on high-privilege instance metadata credentials where avoidable.
  • Sanitize and constrain RAG data paths to avoid blindly surfacing full HTTP responses; consider filtering, summarizing, or redacting sensitive headers and body content.

How teams detect issues like this

Organizations can pursue several strategies to detect and monitor similar SSRF risks:

  • Static analysis: Flag direct calls to HTTP clients (e.g., requests.get, post, or generic HTTP libraries) that consume user-controlled URLs without validation or domain checks.
  • Code review cues: Look for RAG, webhooks, or "URL fetch" features that:
  • Accept arbitrary URLs from user input.
  • Skip hostname allowlists or IP range checks.
  • Lack clear separation between public and internal destinations.
  • Runtime monitoring: Use network monitoring and egress logs to detect unexpected outbound connections to:
  • Cloud metadata endpoints (e.g., 169.254.169.254).
  • Internal IP ranges or service discovery domains.
  • Policy enforcement: Apply outbound firewall policies, service mesh rules, or egress gateways that:
  • Deny traffic to metadata and internal segments by default.
  • Require explicit rules for any new external dependency.

Sources

SourceLink
github.comgithub.com/oobabooga/text-generation-webui/security/advisories/GHSA-jvrj-w5hq-6cp2

Frequently asked

questions

Yes, if the text-generation-webui instance is exposed (directly or via a proxy) and an attacker can supply URLs to the RAG extensions. The attacker does not need direct network access to internal resources; they only need to reach the web UI and influence the URL parameter.

The attacker must be able to trigger a RAG workflow that accepts a URL and have that URL passed to the backend. This might be anonymous or authenticated depending on how the deployment protects the UI or API, but no shell or direct network login to the host is required.

Constrain server-side HTTP requests to a tightly controlled set of destinations using allowlists, reject internal and link-local address ranges, validate schemes, and enforce egress restrictions at the network layer. Avoid using generic "fetch any URL" functionality in privileged or broadly connected backend services.

Treat any user-controlled URL as untrusted input by default, and design architectures where backend services have minimal outbound network reach. Incorporate URL validation libraries, static analysis rules for dangerous HTTP patterns, code review checklists focused on SSRF, and network egress policies so that even if a developer introduces a similar pattern, the environment limits its impact.

Find out what's already
exploitable in your codebase.