/

CVE-2026-110719

Severity:

HIGH RISK

(7.2)

Server-Side Request Forgery (CWE-918) in Portkey Gateway

CVE-2026-110719

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal Service Access and Sensitive Data Exposure

Severity:

HIGH RISK

(7.2)

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

Portkey AI Gateway contains a server-side request forgery vulnerability in custom-host validation, allowing unauthenticated attackers to make the gateway contact loopback and Docker host services. The issue becomes risky when the trusted custom-host policy is unset and attacker-controlled request headers influence outbound provider requests.

Portkey AI Gateway contains a server-side request forgery vulnerability in custom-host validation, allowing unauthenticated attackers to make the gateway contact loopback and Docker host services. The issue becomes risky when the trusted custom-host policy is unset and attacker-controlled request headers influence outbound provider requests.

Affected context

The vulnerability affects Portkey AI Gateway deployments in the affected release range when custom-host validation relies on localhost-style host acceptance and TRUSTED_CUSTOM_HOSTS is not configured. It can be reached through gateway request paths that process the x-portkey-custom-host header, including provider integrations such as Ollama.

The vulnerability affects Portkey AI Gateway deployments in the affected release range when custom-host validation relies on localhost-style host acceptance and TRUSTED_CUSTOM_HOSTS is not configured. It can be reached through gateway request paths that process the x-portkey-custom-host header, including provider integrations such as Ollama.

Exploit preconditions

  • Attack surface: The externally reachable Portkey AI Gateway HTTP API
  • Required access: No authentication is required when the affected request path is exposed
  • Trigger point: Processing of a request that supplies an attacker-controlled custom-host value
  • Why exploitation is possible: Host validation may trust loopback-style destinations when the trusted-host configuration is unset, allowing the gateway to issue server-side requests to internal services
  • Attack surface: The externally reachable Portkey AI Gateway HTTP API
  • Required access: No authentication is required when the affected request path is exposed
  • Trigger point: Processing of a request that supplies an attacker-controlled custom-host value
  • Why exploitation is possible: Host validation may trust loopback-style destinations when the trusted-host configuration is unset, allowing the gateway to issue server-side requests to internal services

Why this happens

The underlying bug is insufficient validation of an attacker-influenced destination before the gateway performs an outbound request. When the trusted custom-host policy is absent, localhost-style hosts may be treated as acceptable rather than denied by default. This behavior maps to CWE-918: Server-Side Request Forgery, because an external requester can influence the gateway into accessing resources from its own network position.

The underlying bug is insufficient validation of an attacker-influenced destination before the gateway performs an outbound request. When the trusted custom-host policy is absent, localhost-style hosts may be treated as acceptable rather than denied by default. This behavior maps to CWE-918: Server-Side Request Forgery, because an external requester can influence the gateway into accessing resources from its own network position.

Potential impact

  • Attackers may access responses from loopback services
  • Internal administrative or metadata endpoints could be exposed
  • Docker host services may be queried from the gateway environment
  • Internal network topology and service information could be disclosed
  • Compromised internal services could enable further actions or lateral movement
  • Attackers may access responses from loopback services
  • Internal administrative or metadata endpoints could be exposed
  • Docker host services may be queried from the gateway environment
  • Internal network topology and service information could be disclosed
  • Compromised internal services could enable further actions or lateral movement

General mitigation guidance

Mitigation generally focuses on making outbound destination validation deny-by-default and reducing trust in request-supplied host values.

Common defensive patterns include:

  • Require an explicit allowlist for permitted custom hosts
  • Reject loopback, link-local, private, carrier-grade NAT, and other restricted address ranges unless explicitly required
  • Resolve hostnames and validate the resulting addresses before connecting, including protections against DNS rebinding
  • Keep trusted-host configuration explicit and fail closed when it is absent or invalid
  • Restrict gateway egress with network policies, firewall rules, and separate service identities
  • Avoid returning unrestricted upstream responses to untrusted clients
  • Run the gateway with only the network and service privileges it needs

Mitigation generally focuses on making outbound destination validation deny-by-default and reducing trust in request-supplied host values.

Common defensive patterns include:

  • Require an explicit allowlist for permitted custom hosts
  • Reject loopback, link-local, private, carrier-grade NAT, and other restricted address ranges unless explicitly required
  • Resolve hostnames and validate the resulting addresses before connecting, including protections against DNS rebinding
  • Keep trusted-host configuration explicit and fail closed when it is absent or invalid
  • Restrict gateway egress with network policies, firewall rules, and separate service identities
  • Avoid returning unrestricted upstream responses to untrusted clients
  • Run the gateway with only the network and service privileges it needs

How teams detect issues like this

Detection approaches can include:

  • Static analysis for request-derived URLs, hosts, or proxy targets used in outbound HTTP clients
  • Code review checks for allowlists that are optional, empty, or fail open
  • Tests covering loopback, private, link-local, IPv6 local, and DNS-rebinding destinations
  • Gateway logs correlating custom-host headers with outbound requests to restricted address ranges
  • Network monitoring for unexpected connections from the gateway to Docker, metadata, and internal administrative services
  • Policy enforcement that requires explicit egress controls and trusted-host configuration

Automated security review tools may help identify SSRF-prone URL construction and incomplete destination validation.

Detection approaches can include:

  • Static analysis for request-derived URLs, hosts, or proxy targets used in outbound HTTP clients
  • Code review checks for allowlists that are optional, empty, or fail open
  • Tests covering loopback, private, link-local, IPv6 local, and DNS-rebinding destinations
  • Gateway logs correlating custom-host headers with outbound requests to restricted address ranges
  • Network monitoring for unexpected connections from the gateway to Docker, metadata, and internal administrative services
  • Policy enforcement that requires explicit egress controls and trusted-host configuration

Automated security review tools may help identify SSRF-prone URL construction and incomplete destination validation.

Sources

SourceLink
github.comgithub.com/Portkey-AI/gateway
github.comgithub.com/Portkey-AI/gateway/blob/ca7712947ec8c0887803990b746740d36011c697/src/middlewares/requestValidator/index.ts#L289
hackmd.iohackmd.io/@1ExmmukzRMWN7B4gQ4W-4Q/BJypv-aiMg
vulncheck.comvulncheck.com/advisories/portkey-ai-gateway-1.14.0-through-1.15.2-ssrf-via-x-portkey-custom-host-header

Frequently asked

questions

Yes. Where the affected gateway endpoint is internet-accessible, an unauthenticated attacker may influence the destination of server-side requests through the custom-host request handling.

No prior authentication is expected to be necessary for the vulnerable request path. The gateway must be reachable, and the relevant provider or custom-host functionality must process attacker-controlled input.

Use explicit, deny-by-default host allowlists, reject restricted network destinations, and fail closed when trusted-host configuration is missing or invalid.

Treat all request-derived destinations as untrusted, validate resolved IP addresses and redirects, enforce network-level egress restrictions, and test every outbound request feature against internal and special-purpose address ranges.

Yes. Where the affected gateway endpoint is internet-accessible, an unauthenticated attacker may influence the destination of server-side requests through the custom-host request handling.

No prior authentication is expected to be necessary for the vulnerable request path. The gateway must be reachable, and the relevant provider or custom-host functionality must process attacker-controlled input.

Use explicit, deny-by-default host allowlists, reject restricted network destinations, and fail closed when trusted-host configuration is missing or invalid.

Treat all request-derived destinations as untrusted, validate resolved IP addresses and redirects, enforce network-level egress restrictions, and test every outbound request feature against internal and special-purpose address ranges.

Find out what's already
exploitable in your codebase.