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 necessaryhttp) 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.

