GHSA-HHH5-2CVX-VMFP
Vulnerability from github – Published: 2025-12-02 01:08 – Updated: 2025-12-02 01:08Summary
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
https://cwe.mitre.org/data/definitions/918.html
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@portkey-ai/gateway"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.14.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-66405"
],
"database_specific": {
"cwe_ids": [
"CWE-918"
],
"github_reviewed": true,
"github_reviewed_at": "2025-12-02T01:08:37Z",
"nvd_published_at": "2025-12-01T23:15:53Z",
"severity": "MODERATE"
},
"details": "### 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\u0027s 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",
"id": "GHSA-hhh5-2cvx-vmfp",
"modified": "2025-12-02T01:08:38Z",
"published": "2025-12-02T01:08:37Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Portkey-AI/gateway/security/advisories/GHSA-hhh5-2cvx-vmfp"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-66405"
},
{
"type": "WEB",
"url": "https://github.com/Portkey-AI/gateway/pull/1372"
},
{
"type": "WEB",
"url": "https://github.com/Portkey-AI/gateway/commit/b5a7825ba5f4e6918deb32d9969899ce2229a885"
},
{
"type": "PACKAGE",
"url": "https://github.com/Portkey-AI/gateway"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "Portkey.ai Gateway: Server-Side Request Forgery (SSRF) in Custom Host"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.