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/responsesendpoint - 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_urlvalue 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

