/

CVE-2026-55537

Severity:

HIGH RISK

(7.1)

TOCTOU SSRF (CWE-367) in PraisonAI Webhook Validation

CVE-2026-55537

Deferred

Vulnerability type

Category:

Time-of-Check Time-of-Use (TOCTOU) / Server-Side Request Forgery

CWE:

CWE-367, CWE-705, CWE-918

Impact:

Server-Side Request Forgery and unauthorized access to internal services

Severity:

HIGH RISK

(7.1)

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 may approve a webhook URL after a DNS resolution error, then resolve the same URL again when sending the webhook. If DNS results change between validation and use, an attacker could redirect the request to an internal service or protected network resource.

Affected context

The issue occurs in PraisonAI deployments that validate user- or configuration-supplied webhook URLs before sending requests. Risk is higher when DNS resolution can fail during validation, the URL is accepted despite that failure, and the later webhook request performs a separate DNS lookup without binding validation to the actual destination.

Exploit preconditions

  • Attack surface: Webhook URL validation and delivery functionality
  • Required access: Ability to supply or influence a webhook URL, subject to the application's authorization model
  • Trigger point: A DNS resolution failure during validation followed by a successful or altered lookup during webhook delivery
  • Why exploitation is possible: The validation and request phases use separate DNS lookups, and the exception path accepts the URL after a socket.gaierror

Why this happens

The vulnerability is caused by a time-of-check time-of-use race condition, mapped to CWE-367. PraisonAI checks the webhook destination during validation, but a DNS resolution error is ignored and the URL remains accepted. The later request performs a fresh lookup, allowing the destination associated with the hostname to differ from the one implicitly trusted during validation. This behavior also relates to CWE-918, because an attacker may influence a server-side request toward internal resources, and CWE-705, where exceptional control-flow handling permits an unsafe outcome.

Potential impact

  • Requests could be directed to internal services
  • Cloud or runtime metadata endpoints may be exposed where reachable
  • Internal administrative interfaces could receive attacker-influenced requests
  • Network reconnaissance or unauthorized service interaction could occur
  • Sensitive response data could potentially be disclosed, depending on webhook handling

General mitigation guidance

Mitigation generally focuses on making destination validation and request delivery use a consistent, trusted network destination.

Common defensive patterns include:

  • Treating DNS resolution failures as validation failures rather than accepting the URL
  • Resolving the destination once and binding the subsequent request to the validated address
  • Revalidating redirects and every resolved destination against explicit network policies
  • Blocking loopback, link-local, private, reserved, and otherwise disallowed address ranges
  • Restricting outbound connectivity through network egress policies
  • Applying authentication and least privilege to webhook execution paths
  • Reducing trust in user-controlled URLs through allowlists or managed webhook configurations

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis for URL validation followed by a separate request-time resolution
  • Code review checks for ignored DNS exceptions such as socket.gaierror
  • Tests that simulate DNS changes, resolution failures, redirects, and private-address transitions
  • Egress monitoring for webhook requests to loopback, link-local, private, or unexpected networks
  • Policy enforcement requiring approved webhook domains and destination ranges
  • Automated security review tools that flag SSRF patterns and check/use gaps

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/2f9677abb2ea68eab864ee8b6a828fd0141612e1
github.comgithub.com/MervinPraison/PraisonAI/releases/tag/v4.6.58
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-rg5q-pp8p-f7jm

Frequently asked

questions

It may be exploitable through a reachable webhook configuration or API if an attacker can influence the webhook URL and affect DNS resolution. The practical scope depends on authorization and outbound network controls.

Usually, some authorized or otherwise available ability to create or modify webhook requests is required. The exact requirement depends on how PraisonAI exposes webhook configuration.

Treat DNS resolution errors as failures, validate the resolved destination against an explicit policy, and bind the actual request to the validated destination rather than resolving the hostname independently later.

Use centralized SSRF-safe URL handling, enforce outbound network restrictions, test DNS and redirect edge cases, and monitor requests to internal or reserved address ranges.

Find out what's already
exploitable in your codebase.