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

