Summary
A Server-Side Request Forgery (SSRF) flaw in SillyTavern's asset download endpoint allows authenticated users to instruct the server to make arbitrary HTTP requests and return the full response body.
When abused, this behavior can expose internal services, cloud metadata endpoints, and private network resources that are not normally reachable from the user's environment.
Affected context
This vulnerability affects SillyTavern deployments where:
- The asset download endpoint is exposed to authenticated users
- The server has network connectivity to internal or cloud-only endpoints (e.g., 127.0.0.1, RFC1918 networks, metadata services)
- Asset URLs provided by users are not sufficiently constrained or validated
It is most impactful in environments where the SillyTavern server runs within a network that has access to sensitive internal services or cloud infrastructure APIs.
Exploit preconditions
- Attack surface: HTTP(S) asset download endpoint reachable by authenticated users
- Required access: Valid authenticated account capable of submitting URLs for asset download
- Trigger point: Supplying a crafted URL that targets internal or otherwise restricted network locations
- Why exploitation is possible: The endpoint forwards user-supplied URLs as outbound HTTP requests from the server itself and returns the full response body without enforcing strict domain or address restrictions.
Why this happens
The core issue is a lack of proper validation and restriction on user-supplied URLs that the server uses to perform outbound HTTP requests.
This aligns with CWE-918: Server-Side Request Forgery (SSRF), where an application accepts attacker-controlled URLs or endpoints and uses them in server-side network calls.
Because the server typically has a broader and more privileged network view than the client, unvalidated URL-based requests allow attackers to leverage the server as a proxy into internal networks or protected services.
Potential impact
- Unauthorized access to internal HTTP services not directly exposed to users
- Retrieval of cloud instance metadata, which may include credentials or configuration secrets
- Discovery and enumeration of internal network structure via response behavior
- Potential pivoting to additional attacks if internal services expose administrative or management interfaces
- Exposure of sensitive configuration data, diagnostics, or APIs accessible only from within the server's network environment
General mitigation guidance
Effective mitigation focuses on strictly constraining server-initiated HTTP requests that are derived from user input:
- Implement domain and scheme allowlists for all user-controlled URLs used in outbound requests, limiting access to a small set of trusted hosts.
- Reject or aggressively restrict requests to private IP ranges, loopback addresses, link-local addresses, and cloud metadata endpoints.
- Normalize and validate URLs before use, guarding against DNS rebinding, redirects, or URL parsing ambiguities.
- Apply the principle of least privilege at the network layer by segmenting the application server away from sensitive internal services where possible.
- Where feasible, separate asset retrieval into a dedicated, locked-down service with minimal network reach and no access to critical infrastructure.
How teams detect issues like this
Detection generally combines code-level review with runtime monitoring:
- Static analysis / code review:
- Identify endpoints that accept user-supplied URLs or hostnames and use them in server-side HTTP clients.
- Flag patterns where response bodies from outbound requests are returned directly to the requester.
- Verify that allowlists, blocklists, and IP range checks are consistently applied and correctly implemented.
- Configuration and policy enforcement:
- Enforce internal coding standards requiring URL allowlists and IP range checks for all outbound, user-controlled requests.
- Integrate automated linters or SAST tools to detect SSRF-prone patterns (e.g., calls to HTTP libraries with unvalidated URL parameters).
- Operational monitoring:
- Monitor logs for unusual outbound requests, especially to cloud metadata endpoints, localhost, or private IP ranges.
- Use network-level rules (firewalls, security groups) to restrict the server's ability to reach sensitive internal services.

