/

CVE-2026-46372

Severity:

HIGH RISK

(8.5)

SSRF in SillyTavern SearxNG Search Proxy

CVE-2026-46372

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal HTTP services and potential exposure of sensitive data

Severity:

HIGH RISK

(8.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

SillyTavern's SearxNG search API endpoint (/api/search/searxng) allows an authenticated low-privilege user to control the baseUrl parameter, which is used directly in server-side HTTP requests.

Under these conditions, an attacker can coerce the application into making requests to internal or loopback HTTP services and exfiltrating the response body, resulting in a classic server-side request forgery (SSRF) scenario.

Affected context

This vulnerability appears in SillyTavern deployments that:

  • Enable and expose the /api/search/searxng endpoint
  • Allow authenticated users, including low-privilege accounts, to invoke that endpoint
  • Do not restrict or validate the baseUrl parameter used to construct outbound HTTP requests

In such setups, the server can be abused as a network proxy, particularly when it has access to internal or loopback-only services that are not directly exposed to users.

Exploit preconditions

  • Attack surface: HTTP API endpoint at /api/search/searxng
  • Required access: Valid authenticated account with permission to call the SearxNG search endpoint (low privilege is sufficient)
  • Trigger point: Supplying a crafted baseUrl value that points to an internal, loopback (127.0.0.1, ::1), or otherwise restricted HTTP service
  • Why exploitation is possible: The application uses the attacker-supplied baseUrl directly when performing server-side fetches, without adequate validation, DNS/host allowlisting, or network boundary checks. This allows the server to initiate HTTP requests to locations the attacker cannot reach directly.

Why this happens

The core issue maps to CWE-918: Server-Side Request Forgery (SSRF).

The /api/search/searxng endpoint is implemented as a proxy-like feature that accepts a baseUrl parameter, then performs an outbound HTTP fetch from the server. Because baseUrl is treated as trusted input and interpolated directly into the request target, users can redirect the server to arbitrary destinations.

Conceptually, this is an insecure pattern where user-controlled data is used to determine network locations for server-initiated requests, without enforcing constraints on scheme, host, port, or path. As a result, internal or loopback resources that should be unreachable from users become indirectly accessible through the application.

Potential impact

  • Access to internal HTTP endpoints that are not exposed to end users (e.g., admin panels, metrics endpoints, internal APIs)
  • Probing of the server's local network topology by observing which internal hosts or paths respond
  • Reading sensitive response bodies from loopback services (127.0.0.1, ::1), such as local dashboards, development tools, or metadata endpoints
  • Using the application as a stepping stone for further attacks against internal services (e.g., credential harvesting from configuration services or metadata APIs)
  • Potential abuse of internal endpoints that change state via GET/POST if they are reachable and lack authentication

General mitigation guidance

Addressing SSRF generally involves reducing the trust placed in user-supplied URLs and tightening control over server-side network egress:

  • Apply strict validation and normalization to any user-controlled URL fields, restricting them to known-safe hosts, schemes, and ports (e.g., via allowlists).
  • Treat proxy-like endpoints as high-risk and avoid exposing arbitrary destination control to non-administrative users; when possible, hard-code or configure fixed upstream endpoints instead.
  • Implement network-level egress controls (firewall rules, container network policies) to prevent application servers from reaching sensitive internal or metadata services.
  • Enforce least-privilege principles so that services handling outbound HTTP requests only have access to the minimal set of internal resources required for their function.
  • Design the API surface to return only the specific, sanitized data needed from upstream services instead of relaying arbitrary responses directly to users.

How teams detect issues like this

To detect vulnerabilities in this class, organizations can:

  • Use static analysis rules that flag functions or modules where URLs or hosts are constructed directly from HTTP parameters, JSON fields, or other user-controllable sources.
  • During code review, pay special attention to "proxy", "fetch", "HTTP client", or "search" endpoints that appear to forward requests, and verify they enforce host and scheme restrictions.
  • Apply runtime monitoring and logging of outbound HTTP requests, looking for unusual destinations such as 127.0.0.1, link-local addresses, or private network ranges being contacted at the request of user actions.
  • Incorporate SSRF-focused security tests into QA and CI pipelines, including automated tools that attempt to route requests to loopback and internal ranges using parameters like baseUrl, url, or endpoint.

Sources

SourceLink
github.comgithub.com/SillyTavern/SillyTavern/security/advisories/GHSA-qg89-qwwh-5f3j

Frequently asked

questions

Exploitation as described requires an authenticated account, even if it is low-privilege. Unauthenticated remote attackers cannot leverage the vulnerable endpoint unless another misconfiguration or vulnerability grants them access.

The attacker needs the ability to sign in and invoke the /api/search/searxng endpoint with a crafted baseUrl value. Elevated privileges are not necessary; any role that can use the search API is sufficient.

The robust pattern is to avoid user-controlled destination URLs entirely where possible, and otherwise enforce strict allowlists for hosts and schemes, combined with network egress restrictions that block access to internal, loopback, and metadata ranges.

Treat any feature that forwards or proxies HTTP requests as security-critical: ensure URL construction never depends directly on raw user input, perform thorough validation and normalization, enforce network-layer protections, and include SSRF checks in security reviews and automated analysis for new or modified endpoints.

Find out what's already
exploitable in your codebase.