Portkey.ai Gateway Server-Side Request Forgery Vulnerability in Custom Host Header Validation
Vulnerability
A server-side request forgery (SSRF) vulnerability has been identified in Portkey.ai Gateway versions prior to 1.14.0. The issue arises because the gateway prioritizes the 'x-portkey-custom-host' request header to determine the destination base URL for external fetches. This lack of proper validation allows users to manipulate the header and direct requests to arbitrary internal hosts, potentially accessing sensitive data from services like the AWS metadata service.
Impact
Exploitation of this vulnerability could lead to unauthorized access to internal resources, allowing attackers to exfiltrate sensitive information, such as data from the AWS metadata service.
Reproduction
To reproduce this vulnerability, send a request to the Portkey.ai Gateway with the 'x-portkey-custom-host' header set to an internal IP address or hostname. The gateway will then make a request to that address, bypassing normal network restrictions.
Remediation
Users can upgrade to Portkey.ai Gateway version 1.14.0 or later, where this vulnerability has been patched. The update includes enhanced validation for the 'x-portkey-custom-host' header, ensuring that only trusted hosts are allowed.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
