Severity:

HIGH RISK

(7.3)

SSRF in gpt-researcher WebSocket Endpoint

CVE-2026-5633

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Arbitrary outbound requests from the server, potentially reaching internal or sensitive network resources

Severity:

HIGH RISK

(7.3)

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) vulnerability in the gpt-researcher project (up to version 3.4.3) allows attackers to influence how the server fetches external resources via the source_urls argument on a WebSocket endpoint.

By supplying crafted URLs, a remote attacker may coerce the server into making arbitrary outbound requests, potentially reaching internal services or cloud metadata endpoints that are not directly accessible from the internet.

Affected context

This vulnerability occurs in deployments of gpt-researcher that:

  • Expose the WebSocket (ws) endpoint over a network interface reachable by attackers
  • Accept user-controlled source_urls parameters to retrieve or process external content
  • Allow the server process to initiate outbound HTTP/HTTPS (or other protocol) requests without strict egress restrictions

The issue is more severe in environments where the server can reach internal services, management interfaces, or cloud metadata endpoints that should not be accessed based solely on user-provided URLs.

Exploit preconditions

  • Attack surface: Network-accessible WebSocket endpoint in gpt-researcher that processes the source_urls argument.
  • Required access: Ability to initiate a WebSocket connection to the vulnerable endpoint (typically unauthenticated or low-barrier access in many deployments).
  • Trigger point: Submission of crafted source_urls values that reference internal IP ranges, hostnames, or sensitive HTTP endpoints.
  • Why exploitation is possible: The server trusts the source_urls input and uses it directly (or with insufficient validation) to perform outbound requests, effectively allowing user-controlled targets for server-side HTTP calls.

Why this happens

The underlying bug class maps to CWE-918: Server-Side Request Forgery (SSRF).

The application exposes functionality that fetches or processes remote resources based on user-provided URLs via the source_urls parameter on a WebSocket endpoint.

Instead of treating these URLs as untrusted input and constraining where the server may connect, the code appears to forward them to an HTTP client or equivalent networking API with minimal or no validation.

This design pattern—allowing untrusted input to control server-initiated network requests—creates a channel for attackers to pivot the server into acting as a proxy to internal networks or privileged endpoints.

Potential impact

  • May allow attackers to reach internal HTTP services that are not exposed to the public internet.
  • Could enable interaction with cloud provider metadata services, potentially leading to credential exposure.
  • Can be used to perform port scanning or service enumeration of internal network segments from the server's vantage point.
  • May facilitate bypassing IP-based access control lists by routing traffic through the trusted server.
  • Could support further attack chains, including data exfiltration or lateral movement, if sensitive internal APIs are accessible.

General mitigation guidance

Effective mitigation focuses on restricting where and how the server can connect when user input controls URL-based requests:

  • Introduce allowlists for outbound destinations (e.g., only approved domains or hosts may be fetched) and reject all others by default.
  • Implement URL validation and normalization to prevent access to internal IP ranges, localhost, link-local addresses, or non-HTTP schemes.
  • Use network-level egress controls (firewall rules, VPC security groups) to block unnecessary outbound traffic, particularly to internal subnets and metadata endpoints.
  • Treat any user-specified URL as untrusted and consider routing outbound requests through a restricted proxy that enforces domain and path policies.
  • Apply the principle of least privilege to the server's network permissions and service account capabilities so that even if SSRF is attempted, the reachable surface is minimized.

How teams detect issues like this

High-level detection and review approaches typically include:

  • Static analysis and code review to identify code paths where user-controlled parameters (like source_urls) are passed into HTTP clients or URL fetchers without robust validation.
  • Use of custom linting rules or security scanners that flag dynamic URL construction, direct use of user input in network APIs, or lack of destination allowlisting.
  • Configuration and infrastructure reviews to ensure that application servers do not have unnecessary network reachability, especially to internal services or metadata endpoints.
  • Runtime monitoring and logging of outbound requests, with anomaly detection for unusual destinations (e.g., RFC1918 address space, localhost, or cloud metadata IPs) initiated by application components.

Sources

SourceLink
github.comgithub.com/assafelovic/gpt-researcher/
github.comgithub.com/assafelovic/gpt-researcher/issues/1696
vuldb.comvuldb.com/submit/785876
vuldb.comvuldb.com/vuln/355421
vuldb.comvuldb.com/vuln/355421/cti

Frequently asked

questions

Yes. As long as the WebSocket endpoint is exposed over a network reachable by the attacker, they can remotely send crafted source_urls values to attempt SSRF.

Public information does not specify strict authentication requirements, but SSRF issues of this type often occur on endpoints with minimal access controls. At minimum, an attacker needs the ability to open a WebSocket connection and supply the source_urls argument.

The most robust fix is to prevent arbitrary destinations from being fetched based on user input. This usually means enforcing a strict allowlist of permitted domains or endpoints, rejecting internal or unknown addresses, and ensuring that any URL derived from source_urls is validated and normalized before use.

Design features that fetch remote resources with a clear trust boundary: treat URLs as untrusted, avoid making the server a generic proxy, enforce outbound destination policies at both the application and network layers, and incorporate security reviews or automated checks whenever new URL-fetching functionality is introduced.

Find out what's already
exploitable in your codebase.