CVE-2025-66405
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 · uneditedPortkey.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 confidenceThe 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.
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< 1.14.0CVSS 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 checksWork through these to decide whether this CVE applies to you.
-
Determine installed Portkey Gateway versionRun '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.
-
Inspect gateway configuration for custom host header handlingReview 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.
-
Test SSRF vulnerability with a controlled endpointSend 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.
-
Verify authentication is required for proxy requestsConfirm 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.
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 · scoped1.14.0
Upgrade Portkey.ai Gateway to version 1.14.0 or later, which implements secure baseURL handling and eliminates trust in user-supplied host headers.
1.14.0
- 1. Back up your current Gateway deployment and configuration
- 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. Restart the Gateway service with the new version
- 4. Verify the upgrade was successful by checking the Gateway version endpoint
- 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.
- Consultation2.0 h
- Implementation1.0 h
- Testing3.0 h
- Review / QA1.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-66405 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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