CVE-2025-66405 — @portkey-ai/gateway
Fix: Portkey-AI/gateway@b5a7825CVE-2025-66405 is a Server-Side Request Forgery (SSRF) vulnerability in @portkey-ai/gateway. A fix is available for @portkey-ai/gateway — see the affected versions and patch details below.
Portkey.ai Gateway: Server-Side Request Forgery (SSRF) in Custom Host
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-66405.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@portkey-ai/gatewaynpmDescription
Summary
The gateway determines 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 (CWE-918) attack
Impact
This vulnerability can be exploited to force the server to make requests to arbitrary hosts on the internal network. This could allow an attacker to exfiltrate sensitive data, for instance, by accessing the AWS metadata service.
Patches
The issue is patched in 1.14.0 (https://github.com/Portkey-AI/gateway/pull/1372)
The vulnerability resides within the gateway's request processing function which handles the x-portkey-custom-host header. This parameter was passed directly or with insufficient validation/sanitization to an internal HTTP request function.
The fix (v1.14.0) implements a robust allow-list policy:
-
All custom host inputs are now strictly validated to ensure the resulting URI points only to trusted, expected external services.
-
The implementation now explicitly blocks requests to non-routable IP addresses, loopback addresses, private networks and standard metadata endpoints.
Credit
This vulnerability was discovered and reported responsibly by @im-soohyun. We thank them for their adherence to coordinated vulnerability disclosure principles.
References
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @portkey-ai/gateway | all versions | 1.14.0npm install @portkey-ai/gateway@1.14.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @portkey-ai/gateway, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @portkey-ai/gateway to 1.14.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-66405 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-66405 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2025-66405. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2025-66405 in your dependencies?
O3 Security finds CVE-2025-66405 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.