/

CVE-2026-44285

Severity:

HIGH RISK

(7.7)

SSRF in FastGPT Dataset Preview Endpoint

CVE-2026-44285

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal network services via SSRF

Severity:

HIGH RISK

(7.7)

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

A Server-Side Request Forgery (SSRF) flaw in FastGPT's dataset preview endpoint lets an authenticated user bypass internal network protections and force the server to send HTTP GET requests to arbitrary internal services.

The issue is triggered when using the externalFile data import type with /api/core/dataset/file/getPreviewChunks, enabling indirect access to network resources that should not be reachable from the application layer.

Affected context

This vulnerability occurs in FastGPT deployments that:

  • Expose the /api/core/dataset/file/getPreviewChunks endpoint
  • Allow authenticated users to import data via the externalFile data import type
  • Rely on a global isInternalAddress check to block internal network access

In this context, the dataset preview feature performs server-side HTTP GET requests to user-influenced URLs.

Due to an incomplete prior fix, some requests triggered during preview escape the intended internal-address filtering.

Exploit preconditions

  • Attack surface: HTTP API endpoint /api/core/dataset/file/getPreviewChunks
  • Required access: Valid authenticated user account with permission to import or preview external files as dataset sources
  • User-controlled input: URL or location parameters associated with the externalFile data import type
  • Trigger point: Invoking dataset file preview, which causes the server to fetch content by issuing HTTP GET requests
  • Why exploitation is possible: The internal network protection (isInternalAddress) is not consistently applied or is bypassable for preview requests, allowing attacker-controlled URLs to target internal hosts (e.g., 127.0.0.1, metadata services, or internal service endpoints).

Why this happens

The root cause is a classic Server-Side Request Forgery pattern mapped to CWE-918, where a backend feature fetches remote resources based on user-influenced URLs without robust validation.

In this scenario, the dataset preview logic for externalFile sources issues HTTP GET requests using parameters that can be controlled by an authenticated user.

The global isInternalAddress protection is incompletely or inconsistently enforced in the code path used by /api/core/dataset/file/getPreviewChunks, leaving a gap that attackers can exploit to route requests to internal addresses.

Conceptually, the insecure pattern is:

  • Trusting user-provided URLs as fetch targets
  • Performing those requests from a privileged internal network position
  • Relying on a single, brittle internal-address filter that does not fully cover all use cases or canonicalization edge cases.

Potential impact

  • Unauthorized interaction with internal HTTP services that are not directly exposed to the internet
  • Discovery of internal network structure and reachable endpoints through response behavior
  • Potential access to sensitive metadata services (e.g., cloud instance metadata) if reachable via HTTP
  • Abuse of internal APIs that rely on network location for trust, possibly leading to data exposure or configuration manipulation
  • Use of the server as a pivot point for further attacks within the internal network, depending on accessible services

General mitigation guidance

Effective mitigation generally focuses on removing or sharply constraining server-side URL fetches and hardening network trust boundaries, including:

  • Treat all user-supplied URLs as untrusted input and subject them to strict allowlisting (e.g., only specific domains or storage providers for external files).
  • Implement URL validation that accounts for redirects, DNS rebinding, IPv4/IPv6 formats, and special hostnames to robustly exclude internal and link-local ranges.
  • Introduce a separate, restricted HTTP client or egress configuration for all user-driven fetches, with outbound rules that block private and management networks.
  • Decouple sensitive internal service access from general-purpose HTTP clients; never reuse privileged HTTP clients for user-controlled URL fetching.
  • Apply defense in depth with network-level controls (firewalls, service meshes, egress proxies) so that application-layer mistakes do not directly expose internal services.
  • Design preview/import workflows so that, where possible, clients upload data rather than instructing the server to fetch from arbitrary locations.

How teams detect issues like this

SSRF risks can often be surfaced and monitored through a combination of code-level and operational checks:

  • Static analysis: Flag any code paths that:
  • Accept user-controlled URLs or hostnames
  • Use generic HTTP clients (GET, fetch, axios, etc.) without a clearly enforced allowlist or SSRF guard

Rules can specifically look for pairing of request-creation APIs with request parameters derived from HTTP request bodies, query strings, or user configuration.

  • Code review signals: During review, carefully scrutinize:
  • New or modified endpoints that fetch remote content (e.g., dataset import/preview, webhooks, integrations)
  • Reliance on simple isInternalAddress checks instead of centralized URL validation utilities
  • Assumptions that "authenticated users" are inherently trusted in network terms
  • Policy enforcement: Introduce architectural guidelines such as:
  • "All external URL fetching must go through a dedicated SSRF-safe client" with preconfigured restrictions
  • "No direct use of raw HTTP clients with user-influenced URLs"

Automated policy checks in CI/CD can block merges that violate these patterns.

  • Runtime monitoring: At the infrastructure level, monitor outbound HTTP traffic from application pods/instances and alert on:
  • Connections to internal IP ranges from endpoints expected to talk only to the internet
  • Unexpected access attempts to metadata or management endpoints.

Sources

SourceLink
github.comgithub.com/labring/FastGPT/security/advisories/GHSA-c65v-7vx6-f8m3

Frequently asked

questions

Yes, but only by authenticated users of the FastGPT instance. An attacker must be able to call the dataset preview endpoint with crafted parameters, typically via normal application interfaces or APIs.

The attacker needs a valid authenticated account with the ability to create or preview datasets using the externalFile import type. They do not need direct access to internal services; the server issues requests on their behalf.

The safest pattern is to avoid arbitrary server-side URL fetching wherever possible. When it is necessary, strictly restrict the allowed destinations (domain allowlists, path constraints) and route all such requests through a dedicated, locked-down HTTP client and network egress path that cannot reach internal or management networks.

Prevention strategies include:

  • Establishing a centralized URL validation and normalization utility for all user-supplied URLs.
  • Enforcing architectural rules that any user-driven outbound requests must use an SSRF-hardened client.
  • Combining application-level controls with network segmentation and egress filtering so that even if validation fails, internal services remain unreachable.
  • Incorporating SSRF-focused tests and automated checks into CI/CD pipelines, especially for features involving data import, webhooks, or external integrations.
Find out what's already
exploitable in your codebase.