CVE-2025-66405: SSRF Vulnerability in @portkey-ai/gateway Package

@portkey-ai/gateway Updated 02 Dec 2025

Summary

02/12/2025
Yes i
Moderate
Not published

CVE-2025-66405: Portkey.ai Gateway: Server-Side Request Forgery (SSRF) in Custom Host. Affects @portkey-ai/gateway versions < 1.14.0. Fixed in 1.14.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @portkey-ai/gateway package is a tool designed to facilitate secure and efficient communication between clients and external services. It acts as a proxy, allowing users to specify custom hosts for requests. However, this flexibility can lead to security vulnerabilities if not properly managed, particularly in the context of Server-Side Request Forgery (SSRF) attacks.

Vulnerability Detail

The vulnerability arises from the gateway's handling of the x-portkey-custom-host request header, which is used to determine the destination baseURL. Insufficient validation of this header allows attackers to manipulate it, potentially forcing the server to make requests to arbitrary internal hosts. This can lead to unauthorized access to sensitive data, such as AWS metadata, and poses a significant risk to the integrity and confidentiality of the system.

How To Fix

Minimum fixed version

1.14.0

This is the first release that contains the fix.

npm install @portkey-ai/gateway@1.14.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can avoid using the x-portkey-custom-host header until the package is updated. Additionally, ensure that your application has strict input validation and sanitization mechanisms in place to mitigate the risk of SSRF attacks.

Conclusion

The CVE-2025-66405 vulnerability in the @portkey-ai/gateway package poses a significant risk due to its potential for SSRF attacks. It is crucial to update to the patched version 1.14.0 to mitigate this risk and ensure the security of your application.

See every vulnerability recorded for @portkey-ai/gateway →

Share this vulnerability

FAQ

Server-Side Request Forgery (SSRF) is a vulnerability that allows an attacker to send crafted requests from a vulnerable server to internal or external resources.

An attacker can exploit this vulnerability by manipulating the x-portkey-custom-host header to make the server send requests to internal services, potentially accessing sensitive data.

The impacts include unauthorized access to sensitive data, exposure of internal services, and potential data exfiltration.

Yes, the vulnerability is patched in version 1.14.0 of the @portkey-ai/gateway package.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application against this vulnerability using the Vulert playground at Vulert Scanner without needing to sign up.

How To Fix

Minimum fixed version

1.14.0

This is the first release that contains the fix.

npm install @portkey-ai/gateway@1.14.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback