/

CVE-2026-85666

Severity:

HIGH RISK

(7.5)

Server-Side Request Forgery (CWE-918) in OGX API Endpoint

CVE-2026-85666

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized access to internal services and potential credential disclosure

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

OGX contains an unauthenticated server-side request forgery vulnerability in the OpenAI-compatible /v1/responses endpoint. An attacker may provide an MCP tool server_url that causes the server to connect to arbitrary internal destinations and forward attacker-supplied headers or bearer tokens.

Affected context

The vulnerability occurs in OGX deployments that expose the OpenAI-compatible responses endpoint and process MCP tool definitions containing a server_url value. Risk is higher when the default starter configuration is used without authentication and when server-side URL fetching does not apply the same private-address validation used for other URL inputs.

Exploit preconditions

  • Attack surface: The unauthenticated POST /v1/responses endpoint
  • Required access: Network access to the exposed OGX service; authentication may not be required in the default configuration
  • Trigger point: Processing an MCP tool definition containing a server-controlled URL
  • Why exploitation is possible: The server_url value is fetched server-side without destination validation, allowing requests to internal addresses and permitting attacker-supplied headers or authorization values to be forwarded

Why this happens

The vulnerability results from inconsistent URL trust enforcement. Although OGX uses a private-address validation guard for some URL inputs, the MCP server_url field bypasses that control and is treated as an acceptable outbound destination.

This maps to CWE-918: Server-Side Request Forgery, where attacker-influenced input causes a server to initiate network requests to destinations that the attacker may not be able to access directly. Forwarding arbitrary headers or bearer tokens can further increase the impact of the server-side request.

Potential impact

  • An attacker may access cloud instance metadata services and internal administrative endpoints
  • Internal service responses could be exposed through the vulnerable request flow
  • Attacker-controlled headers or bearer tokens could be forwarded to unintended destinations
  • Internal network reconnaissance may be possible
  • Compromised credentials could enable further access or lateral movement

General mitigation guidance

Mitigation generally focuses on applying consistent outbound request controls to every user-influenced URL field.

Common defensive patterns include:

  • Allowing requests only to explicitly approved schemes, hosts, and ports
  • Rejecting loopback, link-local, private, multicast, and other restricted address ranges after DNS resolution
  • Revalidating destinations across redirects and preventing DNS-rebinding bypasses
  • Avoiding the forwarding of attacker-controlled authorization headers or bearer tokens
  • Requiring authentication and authorization for sensitive API endpoints
  • Running outbound-fetching components with minimal network reachability and least privilege
  • Using secure-by-default configurations that do not expose unauthenticated request-processing endpoints

How teams detect issues like this

Organizations can look for SSRF exposure through:

  • Static analysis rules identifying server-side HTTP clients that consume request or tool-definition URL fields
  • Code review checks confirming that every outbound URL path uses centralized destination validation
  • Tests covering loopback, private, link-local, metadata-service, alternate IP representations, redirects, and DNS rebinding
  • Network monitoring for unexpected connections from OGX workloads to internal ranges or cloud metadata addresses
  • Logging and policy enforcement for outbound destinations, schemes, ports, and forwarded authorization headers
  • Automated security review tools that identify missing SSRF guards and unsafe header propagation

Sources

SourceLink
github.comgithub.com/ogx-ai/ogx
github.comgithub.com/ogx-ai/ogx/blob/v1.3.1/src/ogx/providers/utils/tools/mcp.py
github.comgithub.com/ogx-ai/ogx/issues/6287
vulncheck.comvulncheck.com/advisories/ogx-1.3.1-server-side-request-forgery-via-mcp-tool-server-url

Frequently asked

questions

Yes. A remote attacker may be able to exploit it when the OGX responses endpoint is network-accessible and accepts requests without authentication.

No. The vulnerable server performs the outbound connection, so the attacker generally needs access only to the exposed OGX endpoint.

Apply centralized, strict destination validation to every user-influenced URL, block internal and metadata addresses, control redirects, and prevent untrusted values from being forwarded as authorization headers.

Treat all tool-defined and request-provided URLs as untrusted, use allowlists for outbound destinations, enforce authentication at sensitive endpoints, and monitor outbound network activity from application workloads.

Find out what's already
exploitable in your codebase.