GHSA-hhh5-2cvx-vmfp

Suggest an improvement
Source
https://github.com/advisories/GHSA-hhh5-2cvx-vmfp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-hhh5-2cvx-vmfp/GHSA-hhh5-2cvx-vmfp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hhh5-2cvx-vmfp
Aliases
Published
2025-12-02T01:08:37Z
Modified
2025-12-02T01:53:14.002296Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
Portkey.ai Gateway: Server-Side Request Forgery (SSRF) in Custom Host
Details

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:

  1. All custom host inputs are now strictly validated to ensure the resulting URI points only to trusted, expected external services.

  2. 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

Database specific
{
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-918"
    ],
    "nvd_published_at": "2025-12-01T23:15:53Z",
    "github_reviewed_at": "2025-12-02T01:08:37Z",
    "severity": "MODERATE"
}
References

Affected packages

npm / @portkey-ai/gateway

Package

Name
@portkey-ai/gateway
View open source insights on deps.dev
Purl
pkg:npm/%40portkey-ai/gateway

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.14.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-hhh5-2cvx-vmfp/GHSA-hhh5-2cvx-vmfp.json"