Summary
New API's LLM gateway contains a server-side request forgery (SSRF) flaw where requests using 0.0.0.0 as the host are not blocked by the private-IP filter, allowing traffic to be routed to localhost.
Any regular user with a valid API token can craft multimodal requests that cause the server to fetch internal resources, and when routed through specific adaptors, the fetched content may be exposed in model responses, turning a blind SSRF into full-read SSRF.
Affected context
This vulnerability affects deployments of New API (0.11.9-alpha.1 and prior) that:
- Expose the LLM gateway endpoints
/v1/chat/completions,/v1/responses, or/v1/messagesto users holding API tokens - Allow multimodal requests where image or file URLs are fetched server-side
- Rely on the built-in SSRF protection that filters private IP ranges but does not treat
0.0.0.0as equivalent to localhost - Optionally integrate AWS/Bedrock Claude or similar adaptors that inline fetched content into model responses
In these environments, the gateway will accept URLs whose host is 0.0.0.0, resulting in HTTP requests that effectively target localhost or internal interfaces.
Exploit preconditions
- Attack surface: HTTP API endpoints
/v1/chat/completions,/v1/responses, and/v1/messages. - Required access: Any valid (non-admin) API token capable of issuing multimodal requests that reference external image/file URLs.
- Trigger point: Submitting a request where the image/file URL host is
0.0.0.0, which bypasses the private IP filter. - Why exploitation is possible: The SSRF protection logic treats
0.0.0.0as an unspecified address instead of resolving its effective behavior, so requests using this host are not blocked and are routed to localhost or internal interfaces. When combined with adaptors that inline fetched content into model responses, this creates a read channel for internal resources.
Why this happens
The underlying bug stems from incomplete normalization and validation of outbound request destinations in the SSRF protection layer.
While the system attempts to block private and loopback IP ranges, it fails to account for the behavior of the 0.0.0.0 address and does not consistently resolve or canonicalize the effective target before applying policy.
This maps to CWE-918: Server-Side Request Forgery, where a server-side component performs HTTP requests based on user-controlled URLs and insufficiently constrains the reachable addresses, enabling access to internal or otherwise restricted resources.
Potential impact
- Blind SSRF probing of localhost and internal HTTP services reachable from the LLM gateway
- Reading internal service responses when routed through adaptors that inline fetched content into model outputs
- Discovery of internal endpoints, metadata services, or management interfaces exposed on localhost
- Potential leakage of configuration data, credentials, or system metadata exposed via internal HTTP endpoints
- Assisting further attacks such as pivoting to other internal services, depending on what is reachable and exposed
General mitigation guidance
Effective mitigation typically combines stricter network egress control with more robust destination validation:
- Normalize and canonicalize destination hosts and IPs (including
0.0.0.0, loopback, and wildcard addresses) before applying SSRF filters. - Implement explicit allowlists for outbound HTTP destinations used for media fetching or external resources.
- Use network-level egress restrictions (firewalls, security groups, service meshes) to prevent application servers from reaching localhost and sensitive internal ranges for this class of traffic.
- Segregate responsibilities by running resource-fetching components in constrained environments with minimal network access and no access to administrative or metadata interfaces.
- Treat all user-supplied URLs as untrusted and ensure that any content they return is handled as data only, not as configuration or executable instructions.
How teams detect issues like this
Organizations can detect and monitor this class of SSRF issues by:
- Implementing static and configuration analysis rules that flag URL-fetching code paths lacking strict host/IP validation or allowlists.
- Reviewing gateway and adaptor code for any path that accepts user-controlled URLs and issues server-side HTTP requests, ensuring consistent normalization and filtering.
- Enforcing infrastructure policies that log and alert on outbound requests targeting loopback, link-local, metadata service IPs, or unexpected internal ranges from application components.
- Setting up application-level logging for external fetch operations (target host, path, and response metadata) and establishing anomaly detection for unusual patterns or destinations.
- Using automated security testing tools (e.g., SSRF scanners or fuzzers) against API endpoints that accept URLs to validate that internal ranges and special addresses are effectively blocked.

