Summary
PraisonAI's Jobs API /api/v1/runs endpoint contains a blind server-side request forgery flaw where the webhook_url is only safely validated at request time.
Because the URL is re-resolved at connection time, an attacker can use DNS rebinding to pivot webhook callbacks toward internal services that should not be directly reachable.
Affected context
This vulnerability occurs in PraisonAI deployments exposing the Jobs API /api/v1/runs endpoint where webhook callbacks are performed by the server on behalf of users.
It is most relevant when the PraisonAI instance can resolve and reach internal hostnames, metadata services, or other backend endpoints that are not otherwise exposed to the public network.
The issue depends on the webhook_url being accepted after initial validation, but then re-resolved again later, allowing DNS behavior to change between validation and connection.
Exploit preconditions
- Attack surface: Publicly exposed or tenant-accessible /api/v1/runs endpoint
- Required access: Ability to submit a Jobs API request specifying an arbitrary webhook_url parameter (no authentication required in affected versions)
- Trigger point: Server-side HTTP(S) callback from PraisonAI to the supplied webhook_url when a job run progresses or completes
- Why exploitation is possible: The application validates the hostname or IP at request time but performs a fresh DNS resolution at connection time; an attacker-controlled DNS record can return a benign address during validation and an internal/private address during the actual callback, enabling DNS rebinding and blind SSRF
Why this happens
The root cause is a classic server-side request forgery pattern where a server performs outbound HTTP requests based on user-supplied URLs without enforcing consistent, end-to-end target validation.
PraisonAI validates webhook_url only at submission time, tying its trust decision to an initial DNS resolution rather than to the final, effective network destination used for the outbound connection.
Because DNS is mutable and can be controlled by an attacker for certain domains, the server's second resolution at connection time can yield different IP addresses, including internal or restricted endpoints.
This maps to CWE-918: Server-Side Request Forgery (SSRF), in which attackers can coerce server-side HTTP clients into interacting with internal resources.
Potential impact
- Unauthorized access to internal HTTP(S) services that are not exposed publicly
- Interaction with cloud metadata services, which could in some environments lead to credential exposure
- Discovery of internal network structure via response timing and error side channels (blind SSRF)
- Potential interaction with internal administrative or control-plane endpoints, which could in turn enable further compromise depending on their protections
General mitigation guidance
Effective mitigation centers on strictly controlling where server-side HTTP clients may connect and binding validation to the final destination:
- Enforce allowlists of domains or IP ranges for webhook targets, and reject any URLs outside those sets, regardless of DNS changes.
- Perform DNS resolution once and pin the resolved IP, ensuring the same address is used for both validation and the outbound connection.
- Block connections to private, link-local, loopback, and metadata address ranges from webhook and callback subsystems.
- Isolate outbound HTTP client components in network segments or containers with no direct path to sensitive internal services.
- Treat all user-controlled URLs as untrusted, even for "callback-only" or "notification" features, and apply consistent validation and filtering.
How teams detect issues like this
Detection can focus on both code-level patterns and runtime behavior:
- Use static analysis or code review to identify components that accept user-supplied URLs and perform server-side requests without strict allowlists or IP range checks.
- Flag patterns where DNS resolution is performed separately from security validation, especially if resolution is repeated immediately before connection.
- Introduce security unit tests and integration tests that simulate DNS rebinding to verify that outbound requests cannot be redirected to private IP addresses.
- Monitor outbound traffic from application instances for unusual destinations, such as RFC1918/private networks, link-local ranges, or cloud metadata endpoints, and enforce egress firewall rules.

