GatewayApplication · Portkey

CVE-2025-66405

CRITICAL · 9.8 CVSS v3.1 Published 2025-12-01
Fix available
A fix is available. Upgrade to 1.14.0 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The Portkey.ai Gateway prior to 1.14.0 used client-supplied values from the x-portkey-custom-host request header to determine the destination baseURL for proxy requests. This allowed attackers to direct the gateway to fetch arbitrary URLs, enabling SSRF attacks against internal services and infrastructure.

MitigationUpgrade Portkey.ai Gateway to version 1.14.0 or later, which implements secure baseURL handling and eliminates trust in user-supplied host headers.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
GatewayApplication
Affected:< 1.14.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Determine installed Portkey Gateway version
    Run 'portkey-gateway --version' or check the version via the gateway health endpoint (typically /v1/health). If running as a Docker container, inspect the image tag or run 'portkey-gateway --version' inside the container.
    Affected if The version number returned is less than 1.14.0 (e.g., 1.13.0, 1.12.0, etc.) or the version cannot be determined but the software is known to be older.
  2. Inspect gateway configuration for custom host header handling
    Review the gateway configuration file or environment variables for any settings related to 'x-portkey-custom-host', 'custom-host', or similar header processing options. Check if the gateway accepts or processes this header at all.
    Affected if The configuration explicitly enables custom host header processing, or there is no validation/rejection of the x-portkey-custom-host header in the proxy flow.
  3. Test SSRF vulnerability with a controlled endpoint
    Send a proxy request to the gateway with an 'x-portkey-custom-host' header set to an internal or unexpected URL (e.g., http://localhost:8080 or http://169.254.169.254). Observe if the gateway makes a request to that target.
    Affected if The gateway successfully proxies the request to the host specified in the x-portkey-custom-host header rather than rejecting or overriding it with the configured baseURL.
  4. Verify authentication is required for proxy requests
    Confirm that proxy requests require valid authentication (API key or other credentials). The SSRF vulnerability applies to authenticated users, so if no authentication is required, the impact is greater.
    Affected if The gateway allows unauthenticated access to the proxy endpoint that processes the x-portkey-custom-host header.

You are affected if the installed Portkey Gateway version is below 1.14.0 AND the gateway processes the x-portkey-custom-host header to control proxy destinations without proper validation.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.14.0 or later
Fixed in 1.14.0
Vendor patch github.com →
Interim mitigation

Upgrade Portkey.ai Gateway to version 1.14.0 or later, which implements secure baseURL handling and eliminates trust in user-supplied host headers.

Recommended fix High confidence

1.14.0

  1. 1. Back up your current Gateway deployment and configuration
  2. 2. Update the Portkey.ai Gateway to version 1.14.0 (e.g., docker pull portkeyai/gateway:1.14.0 or update your package.json/helm chart)
  3. 3. Restart the Gateway service with the new version
  4. 4. Verify the upgrade was successful by checking the Gateway version endpoint
  5. 5. Test that the x-portkey-custom-host header is no longer honored for external requests (the SSRF vulnerability should be fixed)

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Gateway Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing3.0 h
  • Review / QA1.0 h
7.0 hours of engineering $1,210
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,936.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-66405 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-66405 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data