/

CVE-2025-62616

Severity:

CRITICAL RISK

(9.8)

SSRF in AutoGPT Discord File Sending Component

CVE-2025-62616

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Arbitrary network access from the server, potentially leading to internal data exposure and pivoting into protected services.

Severity:

CRITICAL RISK

(9.8)

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 AutoGPT's SendDiscordFileBlock allows unvalidated URLs to be fetched directly via aiohttp.ClientSession().get.

If an attacker can control the URL parameter, they may coerce the AutoGPT backend into making arbitrary HTTP requests to internal or external services, potentially accessing sensitive resources or abusing internal network trust.

Affected context

This vulnerability arises in AutoGPT deployments where the SendDiscordFileBlock feature is exposed and accepts user-controlled or indirectly influenced URLs.

The affected code path uses aiohttp.ClientSession().get directly on the provided URL without applying allowlists, deny-lists, protocol restrictions, or network boundary checks.

Environments where the AutoGPT service can reach internal networks, metadata services, or other sensitive infrastructure over HTTP are particularly at risk.

Exploit preconditions

  • Attack surface: HTTP API or workflow interface that triggers SendDiscordFileBlock with a caller-specified URL.
  • Required access: Ability to supply or influence the URL parameter (e.g., through an API call, workflow configuration, or upstream integration).
  • Trigger point: Invocation of aiohttp.ClientSession().get using the unvalidated URL in SendDiscordFileBlock.
  • Why exploitation is possible: The implementation does not validate or constrain the destination of outbound HTTP requests, allowing attackers to redirect the server to arbitrary endpoints, including internal-only addresses.

Why this happens

The core issue is unvalidated outbound HTTP requests initiated from a privileged server environment, matching CWE-918: Server-Side Request Forgery (SSRF).

SendDiscordFileBlock passes a user-controlled URL directly into aiohttp.ClientSession().get without:

  • Restricting allowed hostnames, IP ranges, or protocols
  • Blocking access to internal IPs, loopback interfaces, or cloud metadata endpoints
  • Enforcing scheme validation (e.g., limiting to https on trusted domains)

This pattern causes the server to act as a proxy, issuing attacker-directed requests from within the application's network boundary.

Potential impact

  • Access to internal HTTP services that are not directly exposed to the internet (e.g., admin panels, internal APIs).
  • Retrieval of sensitive instance or container metadata from cloud provider metadata endpoints.
  • Enumeration of internal network topology and available services via timing and error responses.
  • Use of the AutoGPT backend as a blind or reflected proxy to bypass IP-based access controls.
  • Potential pivot to further vulnerabilities in internal services (e.g., using SSRF to reach endpoints with SQLi, RCE, or misconfigured admin interfaces).

General mitigation guidance

Effective mitigation focuses on constraining outbound requests and reducing trust in user-supplied URLs:

  • Introduce strict allowlists for permitted domains or paths that SendDiscordFileBlock may contact.
  • Reject or sanitize URLs that resolve to private, loopback, link-local, or multicast IP ranges.
  • Enforce protocol restrictions (e.g., https only) and block non-HTTP schemes.
  • Use network-layer egress controls (firewalls, security groups) to prevent the application from reaching sensitive internal services or metadata endpoints.
  • Run the AutoGPT service with least-privilege network access, limiting what internal resources it can reach even if SSRF is triggered.

How teams detect issues like this

Organizations can detect and manage SSRF risks through multiple layers:

  • Static analysis: Search code for HTTP client calls (e.g., aiohttp.ClientSession().get) that take parameters directly derived from request input or workflow configuration, without validation or allowlisting.
  • Code review: Flag patterns where outbound requests are made to arbitrary URLs, especially in components that handle file loading, webhooks, or proxy-like behavior.
  • Runtime monitoring: Log outbound HTTP requests from the application; alert on connections to unexpected IP ranges (e.g., 169.254.169.254, 127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16).
  • Policy enforcement: Adopt secure coding guidelines requiring domain allowlists for any feature that fetches remote resources and integrate automated checks into CI pipelines.

Sources

SourceLink
github.comgithub.com/Significant-Gravitas/AutoGPT/security/advisories/GHSA-ggc4-4fmm-9hmc

Frequently asked

questions

Yes, if an external user or integration can control or influence the URL passed to SendDiscordFileBlock. In that case, the attacker can cause the server to make arbitrary HTTP requests on their behalf.

That depends on how the AutoGPT instance is exposed. In many deployments, an attacker would need at least the level of access required to configure or trigger workflows that invoke SendDiscordFileBlock. However, if such functionality is exposed through a public API without strong access control, the risk increases significantly.

Apply strict URL validation and domain allowlisting before initiating any outbound request, block private and loopback network ranges, and complement application-level checks with network egress controls that prevent access to sensitive internal endpoints.

Treat all user-controlled URLs as untrusted, enforce central utilities for outbound HTTP with built-in validation and allowlisting, mandate security reviews for any feature that fetches remote content, and incorporate automated scanning for SSRF patterns into your development and review process.

Find out what's already
exploitable in your codebase.