/

CVE-2026-40114

Severity:

HIGH RISK

(7.2)

SSRF in PraisonAI runs Webhook Handling

CVE-2026-40114

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Network Pivoting and Access to Internal/Metadata Services via SSRF

Severity:

HIGH RISK

(7.2)

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

PraisonAI's /api/v1/runs endpoint allows clients to supply an arbitrary webhook_url that the server later calls without any validation.

An unauthenticated attacker can abuse this behavior to make the server send HTTP POST requests to internal or external systems, enabling server-side request forgery (SSRF) against cloud metadata services, internal APIs, and other network-adjacent services.

Affected context

This vulnerability affects PraisonAI deployments where:

  • The /api/v1/runs endpoint is exposed to unauthenticated or broadly authenticated clients
  • The server accepts a webhook_url in the request body and stores it for later use
  • Outbound HTTP requests are allowed from the PraisonAI server to the network and internet

The issue manifests at the point where job completion triggers an HTTP POST to the user-supplied webhook_url using httpx.AsyncClient, without validating scheme, host, or network location.

Exploit preconditions

  • Attack surface: HTTP API endpoint /api/v1/runs exposed by the PraisonAI server
  • Required access: Ability to submit a run request that includes an arbitrary webhook_url (no authentication required in the described configuration)
  • Trigger point: Completion of the submitted job (either success or failure), at which time the server automatically performs an HTTP POST to the attacker-controlled URL
  • Why exploitation is possible: The server fully trusts the webhook_url provided by the client and performs server-side HTTP requests without:
  • Validating that the URL points to an allowed host or network
  • Restricting protocols/schemes to safe values
  • Applying egress filtering or internal host denylists

Why this happens

The root cause is unvalidated, user-controlled URL usage in outbound HTTP requests, corresponding to CWE-918: Server-Side Request Forgery (SSRF).

The application exposes a webhook mechanism where clients can specify a callback URL, but it fails to enforce any policy on where callbacks may be sent. As a result, the server becomes an HTTP proxy into its own private network and environment, allowing attackers to reach internal services that would normally be inaccessible from the outside.

Potential impact

  • Access to cloud instance metadata services, which could lead to credential exposure and further cloud account compromise
  • Interaction with internal APIs, admin panels, or management endpoints not intended to be internet-accessible
  • Enumeration and probing of internal network services and ports
  • Abuse of the server as a pivot point for further attacks within the infrastructure
  • Potential data exfiltration from internal services that respond to crafted POST requests

General mitigation guidance

Effective mitigation centers on treating callback URLs as untrusted input and strictly limiting where the server may connect:

  • Enforce an allowlist of permitted domains or hosts for webhook destinations, resolving and validating hostnames at request time
  • Block access to known-sensitive IP ranges (e.g., link-local metadata addresses, RFC1918 private networks, localhost/loopback, and the server's own IPs)
  • Restrict allowed URL schemes to https (and http if strictly necessary), disallowing file://, gopher://, ftp://, and other non-HTTP protocols
  • Use network-level egress controls (firewalls, security groups, service meshes) to prevent application components from reaching sensitive internal services directly
  • Implement least-privilege networking by isolating components that must perform webhooks into constrained network segments

How teams detect issues like this

Organizations can detect and monitor SSRF risks in webhook implementations through:

  • Static analysis rules that flag outbound HTTP calls where the target URL is derived from request parameters or other untrusted inputs without validation
  • Code review checklists that require:
  • URL allowlisting/denylists
  • Explicit checks for private, loopback, and link-local IPs
  • Scheme validation and DNS rebinding considerations
  • Runtime monitoring and logging of outbound requests, including destination host, IP, and path, with alerts on:
  • Requests to internal IP ranges or metadata endpoints
  • Unusual spikes in outbound POST activity
  • Use of security scanners and dynamic analysis tools designed to probe for SSRF via exposed endpoints that accept URLs or hostnames

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-8frj-8q3m-xhgm

Frequently asked

questions

Yes. If the /api/v1/runs endpoint is exposed over the internet without strong authentication or with weak controls, a remote attacker can submit runs with arbitrary webhook_url values and cause the server to issue HTTP POST requests to targets they choose.

In the described configuration, the vulnerability is exploitable by an unauthenticated attacker. Actual requirements depend on how the endpoint is deployed; if access is restricted by authentication or network controls, those barriers may limit who can trigger the SSRF but do not remove the underlying flaw.

The safest pattern is to never allow arbitrary, unvalidated URLs for server-initiated requests. Instead, enforce strict allowlists of approved domains or endpoints, validate schemes and resolved IPs, and deny access to private and metadata address ranges before making outbound calls.

When designing features that cause the server to connect out (webhooks, integrations, proxies), treat all caller-supplied destinations as untrusted. Apply layered defenses: strong input validation, DNS and IP checks, domain allowlists, restricted egress networking, and security reviews that explicitly consider SSRF as a threat whenever URLs or hosts originate from user input.

Find out what's already
exploitable in your codebase.