Summary
FastGPT's HTTP tools testing endpoint (/api/core/app/httpTools/runTool) functions as a powerful HTTP client, allowing callers to specify target URLs, methods, headers, and bodies.
When exposed without authentication, this endpoint can be abused as a server-side HTTP proxy, enabling attackers to reach internal services, exfiltrate sensitive responses, and pivot within the network.
Affected context
This vulnerability exists in FastGPT deployments where the HTTP tools testing endpoint is reachable over the network without any authentication or access control.
The affected endpoint behaves like a general-purpose HTTP client:
- Accepts arbitrary baseUrl and toolPath values
- Supports configurable HTTP methods, headers, and request bodies
- Returns the raw server-side HTTP response to the caller
In such configurations, the server is effectively turned into an unauthenticated HTTP proxy to any host the FastGPT backend can reach, including internal or otherwise non-public services.
Exploit preconditions
- Attack surface: The FastGPT HTTP tools testing endpoint
/api/core/app/httpTools/runToolexposed over HTTP/HTTPS. - Required access: Network-level ability to send requests to the FastGPT instance; no authentication or user account is needed when misconfigured.
- Trigger point: Submitting crafted requests specifying attacker-controlled
baseUrl,toolPath, HTTP method, headers, and body. - Why exploitation is possible:
- Missing authentication and authorization controls (CWE-306) allow any remote party to invoke the endpoint.
- The server performs outbound HTTP requests to attacker-specified destinations and relays full responses, enabling classic SSRF behavior (CWE-918).
- There is no built-in restriction on target hosts, IP ranges, or protocols, so internal or sensitive endpoints reachable from the server's network can be probed or accessed.
Why this happens
The core issue is the combination of missing access control and a highly flexible server-side HTTP client tied directly to user input.
Functionally, the endpoint:
- Treats attacker-controlled URL components and HTTP parameters as trusted configuration.
- Performs outbound HTTP calls from a privileged network location on behalf of the caller.
- Returns the full server-side response, creating an information-rich feedback loop.
This maps to:
- CWE-306: Missing Authentication for Critical Function — a powerful, system-level capability (arbitrary outbound HTTP requests) is exposed without any authentication barrier.
- CWE-918: Server-Side Request Forgery (SSRF) — user input is used to construct and send HTTP requests from the server to arbitrary locations, potentially including internal or protected services.
Abstractly, the pattern is: "Expose a generic network client API over HTTP without enforcing identity, authorization, or target validation," which creates a proxy-style SSRF gadget.
Potential impact
- Access to internal HTTP(S) services that are not directly exposed to the internet (e.g., admin panels, metadata endpoints, or internal APIs).
- Enumeration and probing of internal network topology and services through timing, status codes, and response content.
- Exfiltration of sensitive data returned by internal endpoints, such as configuration, credentials, or debugging information.
- Use of the FastGPT server as a pivot point for further attacks against backend infrastructure.
- Potential abuse for limited port scanning of internal hosts over HTTP-capable services.
- Circumvention of IP-based or perimeter-only access controls by leveraging the server's own network position.
General mitigation guidance
Effective mitigation focuses on both access control and network request hardening:
- Require strong authentication and appropriate authorization checks for any endpoint that can initiate outbound network requests or act as a "tool runner."
- Treat HTTP proxy–like functionality as a privileged capability; apply role-based access controls and restrict it to trusted, internal users or services.
- Implement strict allowlists for outbound target hosts and paths; avoid passing arbitrary base URLs from clients into server-side HTTP clients.
- Enforce validation on URL inputs:
- Reject private/reserved IP ranges and link-local addresses where possible.
- Restrict protocols to HTTP/HTTPS and disallow redirect chains to unapproved destinations.
- Segment the runtime environment so that application servers have minimal network reach, especially to sensitive internal services and metadata endpoints.
- Apply least-privilege principles to any service accounts or credentials used by the HTTP client to limit what reached services can expose or modify.
- Design testing/debug endpoints so they are disabled or heavily restricted in production, or exposed only on non-public interfaces.
How teams detect issues like this
Organizations can detect and monitor for this type of issue using a combination of code-level and operational techniques:
- Static analysis and code review:
- Flag controllers or routes that:
- Accept user-controlled URLs or hostnames.
- Invoke generic HTTP client libraries (e.g., axios, fetch, requests) with unvalidated user input.
- Are missing authentication and authorization decorators/middleware.
- Establish secure coding guidelines requiring explicit checks around any "HTTP tool," "proxy," or "debug/test" endpoints.
- Configuration and policy enforcement:
- Use API gateways or reverse proxies to enforce authentication, rate limits, and IP restrictions on sensitive endpoints.
- Define security policies that disallow public exposure of tool-testing or debug routes in production environments.
- Runtime monitoring:
- Log calls to endpoints capable of making outbound HTTP requests, including requested target URLs and caller metadata (with privacy considerations).
- Set up anomaly detection for unusual outbound traffic patterns originating from the application, such as requests to unexpected internal ranges or metadata endpoints.
- Security testing:
- Incorporate SSRF checks into regular penetration tests and automated DAST scans, focusing on endpoints that accept URLs or proxy-like parameters.

