{"id":"CVE-2025-66405","aliases":["CVE-2025-66405","GHSA-hhh5-2cvx-vmfp"],"related":[],"kind":"vulnerability","state":"published","title":"Portkey.ai Gateway: Server-Side Request Forgery (SSRF) in Custom Host","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe 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\n\n### Impact\nThis 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.\n\n### Patches\nThe issue is patched in 1.14.0 (https://github.com/Portkey-AI/gateway/pull/1372)\n\nThe 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.\n\n**The fix (v1.14.0) implements a robust allow-list policy:**\n\n1. All custom host inputs are now strictly validated to ensure the resulting URI points only to trusted, expected external services.\n\n2. The implementation now explicitly blocks requests to non-routable IP addresses, loopback addresses, private networks and standard metadata endpoints.\n\n### Credit\nThis vulnerability was discovered and reported responsibly by @im-soohyun. We thank them for their adherence to coordinated vulnerability disclosure principles.\n\n### References\nhttps://cwe.mitre.org/data/definitions/918.html","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-12-01T22:25:36.311Z","modified":"2026-10-18T18:10:00.100Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 1.14.0","status":"affected"}],"vendor":"Portkey-AI","product":"gateway","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.14.0"}],"ecosystem":"npm","package":"@portkey-ai/gateway","purl":"pkg:npm/%40portkey-ai/gateway","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.14.0"}],"vendor":"portkey","product":"gateway","cpe":"cpe:2.3:a:portkey:gateway:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Portkey-AI/gateway/security/advisories/GHSA-hhh5-2cvx-vmfp","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Portkey-AI/gateway/pull/1372","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Portkey-AI/gateway/commit/b5a7825ba5f4e6918deb32d9969899ce2229a885","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66405","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Portkey-AI/gateway","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-12-02T14:11:14.927Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66405","url":"https://www.cve.org/CVERecord?id=CVE-2025-66405","licence":"CVE Terms of Use","modified":"2025-12-02T14:11:29.966Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hhh5-2cvx-vmfp","url":"https://github.com/advisories/GHSA-hhh5-2cvx-vmfp","licence":"CC-BY-4.0","modified":"2025-12-02T01:53:14.002Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66405","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66405","licence":"Public domain","modified":"2026-10-18T18:10:00.100Z"}],"updatedAt":"2026-11-25T22:59:08.152Z","epss":{"score":0.004,"percentile":0.36361,"date":"2026-12-01T12:00:22.000Z"}}