6.9medium
Portkey.ai Gateway: Server-Side Request Forgery (SSRF) in Custom Host
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.40% (higher than 36% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hhh5-2cvx-vmfp
Description
Portkey.ai Gateway is a blazing fast AI Gateway with integrated guardrails. Prior to 1.14.0, the gateway determined the destination baseURL by prioritizing the value in the x-portkey-custom-host request header. The proxy route then appends the client-specified path to perform an external fetch. This can be maliciously used by users for SSRF attacks. This vulnerability is fixed in 1.14.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Portkey-AI gateway | < 1.14.0 | CVE List |
| @portkey-ai/gateway (npm) | before 1.14.0 | GitHub Advisory Database |
| portkey gateway | before 1.14.0 | NVD |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Portkey.ai Gateway is a blazing fast AI Gateway with integrated guardrails. Prior to 1.14.0, the gateway determined the destination baseURL by prioritizing the value in the x-portkey-custom-host request header. The proxy route then appends the client-specified path to perform an external fetch. This can be maliciously used by users for SSRF attacks. This vulnerability is fixed in 1.14.0.
GitHub Advisory Database
Summary
The gateway determines the destination baseURL by prioritizing the value in the x-portkey-custom-host request header. The proxy route then appends the client-specified path to perform an external fetch. This can be maliciously used by users for SSRF (CWE-918) attack
Impact
This vulnerability can be exploited to force the server to make requests to arbitrary hosts on the internal network. This could allow an attacker to exfiltrate sensitive data, for instance, by accessing the AWS metadata service.
Patches
The issue is patched in 1.14.0 (https://github.com/Portkey-AI/gateway/pull/1372)
The vulnerability resides within the gateway's request processing function which handles the x-portkey-custom-host header. This parameter was passed directly or with insufficient validation/sanitization to an internal HTTP request function.
The fix (v1.14.0) implements a robust allow-list policy:
-
All custom host inputs are now strictly validated to ensure the resulting URI points only to trusted, expected external services.
-
The implementation now explicitly blocks requests to non-routable IP addresses, loopback addresses, private networks and standard metadata endpoints.
Credit
This vulnerability was discovered and reported responsibly by @im-soohyun. We thank them for their adherence to coordinated vulnerability disclosure principles.
References
NVD (es)
Portkey.ai Gateway es un Gateway de IA extremadamente rápido con barreras de seguridad integradas. Versiones anteriores a 1.14.0, el gateway determinaba la baseURL de destino priorizando el valor en el encabezado de solicitud x-portkey-custom-host. La ruta del proxy luego añade la ruta especificada por el cliente para realizar una recuperación externa. Esto puede ser utilizado maliciosamente por los usuarios para ataques SSRF. Esta vulnerabilidad está corregida en 1.14.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-66405 changed 2025-12-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hhh5-2cvx-vmfp changed 2025-12-02 | CC-BY-4.0 |
| NVD | CVE-2025-66405 changed 2026-10-18 | Public domain |