/

CVE-2026-65317

Severity:

HIGH RISK

(8.6)

SSRF (CWE-918) via Origin Bypass in Verba RAG API

CVE-2026-65317

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Arbitrary outbound HTTP requests and potential internal service exposure

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

Verba RAG 2.1.3 contains a server-side request forgery flaw where the backend can be coerced into issuing arbitrary HTTP requests to attacker-chosen hosts and ports.

By abusing a same-origin middleware bypass through a crafted Origin header and controlling connection parameters, unauthenticated attackers can turn the application into an HTTP proxy to internal or external targets.

Verba RAG 2.1.3 contains a server-side request forgery flaw where the backend can be coerced into issuing arbitrary HTTP requests to attacker-chosen hosts and ports.

By abusing a same-origin middleware bypass through a crafted Origin header and controlling connection parameters, unauthenticated attackers can turn the application into an HTTP proxy to internal or external targets.

Affected context

This vulnerability manifests in deployments of the Verba RAG application that:

  • Expose the /api/connect endpoint over the network
  • Enforce same-origin or localhost-only checks via middleware based on the Origin header
  • Allow client-supplied host and port values to be used when creating outbound HTTP connections

In such configurations, any origin validation that can be bypassed with a specially formatted header leaves the application susceptible to SSRF-style abuse.

This vulnerability manifests in deployments of the Verba RAG application that:

  • Expose the /api/connect endpoint over the network
  • Enforce same-origin or localhost-only checks via middleware based on the Origin header
  • Allow client-supplied host and port values to be used when creating outbound HTTP connections

In such configurations, any origin validation that can be bypassed with a specially formatted header leaves the application susceptible to SSRF-style abuse.

Exploit preconditions

  • Attack surface: Publicly reachable /api/connect HTTP endpoint of the Verba RAG application.
  • Required access: No authentication is required; only the ability to send crafted HTTP requests with custom headers and query/body parameters.
  • Trigger point: Invocation of /api/connect with a manipulated Origin header and attacker-controlled host and port values, causing the server to perform outbound GET requests.
  • Why exploitation is possible: The origin-check middleware incorrectly trusts any Origin value that starts with a specific prefix, treating it as localhost, and the application then uses unvalidated host and port parameters to construct server-side HTTP requests.
  • Attack surface: Publicly reachable /api/connect HTTP endpoint of the Verba RAG application.
  • Required access: No authentication is required; only the ability to send crafted HTTP requests with custom headers and query/body parameters.
  • Trigger point: Invocation of /api/connect with a manipulated Origin header and attacker-controlled host and port values, causing the server to perform outbound GET requests.
  • Why exploitation is possible: The origin-check middleware incorrectly trusts any Origin value that starts with a specific prefix, treating it as localhost, and the application then uses unvalidated host and port parameters to construct server-side HTTP requests.

Why this happens

The core issue is a broken origin validation combined with unsafe use of user-controlled connection parameters, aligning with CWE-918: Server-Side Request Forgery (SSRF).

The middleware attempts to restrict access to localhost-origin requests but relies on a naive string-prefix check that can be trivially bypassed.

Once this check is bypassed, the /api/connect handler directly incorporates attacker-supplied host and port values into outbound HTTP calls without adequate validation or restriction of reachable destinations.

Abstractly, this pattern occurs when server-side network clients are exposed through web endpoints, and trust is placed in headers or parameters that attackers fully control, allowing them to redirect backend traffic to arbitrary endpoints.

The core issue is a broken origin validation combined with unsafe use of user-controlled connection parameters, aligning with CWE-918: Server-Side Request Forgery (SSRF).

The middleware attempts to restrict access to localhost-origin requests but relies on a naive string-prefix check that can be trivially bypassed.

Once this check is bypassed, the /api/connect handler directly incorporates attacker-supplied host and port values into outbound HTTP calls without adequate validation or restriction of reachable destinations.

Abstractly, this pattern occurs when server-side network clients are exposed through web endpoints, and trust is placed in headers or parameters that attackers fully control, allowing them to redirect backend traffic to arbitrary endpoints.

Potential impact

  • Attackers may cause the application server to send HTTP requests to arbitrary external servers under their control.
  • Attackers could probe internal network services that are not directly exposed to the internet.
  • The vulnerability can be used to perform limited port scanning or service enumeration on internal infrastructure reachable from the application.
  • Depending on downstream service behavior, attackers could access sensitive metadata APIs or internal admin interfaces via the server.
  • SSRF-driven interactions may enable further exploitation chains, such as credential theft from metadata services or pivoting into internal APIs.
  • Attackers may cause the application server to send HTTP requests to arbitrary external servers under their control.
  • Attackers could probe internal network services that are not directly exposed to the internet.
  • The vulnerability can be used to perform limited port scanning or service enumeration on internal infrastructure reachable from the application.
  • Depending on downstream service behavior, attackers could access sensitive metadata APIs or internal admin interfaces via the server.
  • SSRF-driven interactions may enable further exploitation chains, such as credential theft from metadata services or pivoting into internal APIs.

General mitigation guidance

Effective mitigation centers on tightening how server-side HTTP clients are exposed and how origin and destination are validated.

Common defensive patterns include:

  • Implement strict origin validation that compares against an explicit allowlist and uses robust parsing rather than prefix checks.
  • Avoid using user-supplied host and port values directly in server-side connection logic; instead, restrict destinations to a controlled set of endpoints or resolve them through internal configuration.
  • Introduce SSRF guards by enforcing network-layer restrictions (e.g., disallowing connections to internal IP ranges, loopback addresses, and metadata service endpoints).
  • Decouple public APIs from generic HTTP client capabilities, exposing only narrowly scoped operations instead of arbitrary connect functionality.
  • Apply least-privilege principles to the server's network access, limiting outbound connectivity to the minimum required destinations.

Effective mitigation centers on tightening how server-side HTTP clients are exposed and how origin and destination are validated.

Common defensive patterns include:

  • Implement strict origin validation that compares against an explicit allowlist and uses robust parsing rather than prefix checks.
  • Avoid using user-supplied host and port values directly in server-side connection logic; instead, restrict destinations to a controlled set of endpoints or resolve them through internal configuration.
  • Introduce SSRF guards by enforcing network-layer restrictions (e.g., disallowing connections to internal IP ranges, loopback addresses, and metadata service endpoints).
  • Decouple public APIs from generic HTTP client capabilities, exposing only narrowly scoped operations instead of arbitrary connect functionality.
  • Apply least-privilege principles to the server's network access, limiting outbound connectivity to the minimum required destinations.

How teams detect issues like this

Detection typically focuses on identifying SSRF patterns and broken origin checks in code and configuration.

Useful approaches include:

  • Static analysis rules that flag handlers using unvalidated host/port parameters or constructing URLs from request inputs.
  • Code review checklists that require scrutiny of any use of the Origin header and any endpoint that acts as a network proxy or connector.
  • Logging of outbound HTTP requests with origin, destination, and calling endpoint, then monitoring for anomalous patterns such as unexpected internal IPs or unusual ports.
  • Security policy enforcement within CI/CD to block changes introducing generic "connect" style APIs or loosening origin checks without robust validation.
  • Optional use of automated security testing tools capable of SSRF probing against HTTP endpoints to surface misuse of backend HTTP clients.

Detection typically focuses on identifying SSRF patterns and broken origin checks in code and configuration.

Useful approaches include:

  • Static analysis rules that flag handlers using unvalidated host/port parameters or constructing URLs from request inputs.
  • Code review checklists that require scrutiny of any use of the Origin header and any endpoint that acts as a network proxy or connector.
  • Logging of outbound HTTP requests with origin, destination, and calling endpoint, then monitoring for anomalous patterns such as unexpected internal IPs or unusual ports.
  • Security policy enforcement within CI/CD to block changes introducing generic "connect" style APIs or loosening origin checks without robust validation.
  • Optional use of automated security testing tools capable of SSRF probing against HTTP endpoints to surface misuse of backend HTTP clients.

Sources

SourceLink
github.comgithub.com/geo-chen/oss/blob/main/verba.md#finding-2-ssrf--same-origin-middleware-bypass-in-apiconnect----goldenverba
github.comgithub.com/weaviate/Verba
vulncheck.comvulncheck.com/advisories/verba-goldenverba-server-side-request-forgery-via-api-connect-and-same-origin-middleware-bypass

Frequently asked

questions

Yes. As described, unauthenticated remote attackers can exploit the issue as long as they can reach the /api/connect endpoint and send crafted HTTP requests with custom headers and parameters.

The attacker only needs network access to the affected Verba RAG deployment. No prior authentication or privileges are required, but they must be able to control the Origin header and host/port parameters in their requests.

The most robust fix is to remove or strictly constrain functionality that lets clients dictate outbound connection targets, while also enforcing strong origin validation based on explicit allowlists and proper parsing instead of prefix matching.

Design APIs so that server-side HTTP clients only communicate with predefined, trusted endpoints; treat all headers and parameters as untrusted input; implement SSRF-aware validation and network egress controls; and include SSRF checks in code review and automated security testing processes.

Yes. As described, unauthenticated remote attackers can exploit the issue as long as they can reach the /api/connect endpoint and send crafted HTTP requests with custom headers and parameters.

The attacker only needs network access to the affected Verba RAG deployment. No prior authentication or privileges are required, but they must be able to control the Origin header and host/port parameters in their requests.

The most robust fix is to remove or strictly constrain functionality that lets clients dictate outbound connection targets, while also enforcing strong origin validation based on explicit allowlists and proper parsing instead of prefix matching.

Design APIs so that server-side HTTP clients only communicate with predefined, trusted endpoints; treat all headers and parameters as untrusted input; implement SSRF-aware validation and network egress controls; and include SSRF checks in code review and automated security testing processes.

Find out what's already
exploitable in your codebase.