/

CVE-2026-34162

Severity:

CRITICAL RISK

(10.0)

SSRF in FastGPT HTTP Tools Testing Endpoint

CVE-2026-34162

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-306, CWE-918

Impact:

Network Pivoting and Internal Service Access via SSRF

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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/runTool exposed 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.

Sources

SourceLink
github.comgithub.com/labring/FastGPT/commit/bc7eae2ed61481a5e322208829be291faec58c00
github.comgithub.com/labring/FastGPT/pull/6640
github.comgithub.com/labring/FastGPT/releases/tag/v4.14.9.5
github.comgithub.com/labring/FastGPT/security/advisories/GHSA-w36r-f268-pwrj

Frequently asked

questions

Yes, if the FastGPT instance exposes /api/core/app/httpTools/runTool to the internet without network-layer protection, any remote attacker who can reach the service can exploit it without authenticating.

Only network access to the vulnerable endpoint is required. No valid account, API key, or session is needed when authentication is not enforced on the HTTP tools testing endpoint.

Treat any endpoint that can perform outbound HTTP requests as a privileged operation. Enforce authentication and fine-grained authorization, restrict the set of allowed target hosts and paths, and, where possible, remove or disable generic proxy-like capabilities from public-facing APIs entirely.

During design and code review, scrutinize any feature that:

  • Accepts user-controlled URLs or hostnames, or
  • Acts as a "tool runner," proxy, or test harness.

Apply secure defaults: require authentication, use allowlists for outbound connections, restrict network reach of application servers, and incorporate SSRF-specific checks in static analysis and security testing pipelines to catch unsafe patterns early.

Find out what's already
exploitable in your codebase.