CVE-2025-66405 Portkey.ai Gateway: Server-Side Request Forgery (SSRF) in Custom Host

Medium 6.9 Published Updated

Attackers can exploit a custom host header to force the AI Gateway to perform unauthorized external requests, potentially accessing internal resources.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-66405?

CVE-2025-66405 is a medium-severity server-side request forgery vulnerability in Portkey-AI gateway, published on 1 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-918

Which versions are affected by CVE-2025-66405?

2 open source packages ship an affected version, including @portkey-ai/gateway. It affects 1 product.

PackageAffectedFixed in
@portkey-ai/gateway npmAll versions1.14.0
@portkey-ai/gateway npmAll versions1.14.0

Products include Portkey Gateway.

How do I fix CVE-2025-66405?

Upgrade @portkey-ai/gateway to 1.14.0 or later.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2025-66405 being exploited?

There is no known exploitation of CVE-2025-66405 in the wild and no public exploit code.

Sources

Also known as GHSA-hhh5-2cvx-vmfp.

Is CVE-2025-66405 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free