/

CVE-2026-57126

Severity:

HIGH RISK

(8.5)

SSRF (CWE-918) in PraisonAI SpiderTools URL Fetching

CVE-2026-57126

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized access to internal network resources and sensitive responses

Severity:

HIGH RISK

(8.5)

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 SpiderTools can be bypassed when validating hostnames because it checks literal host representations without resolving DNS names before making network requests. An attacker-controlled hostname that resolves to a loopback, private, link-local, or cloud-metadata address may cause the agent to retrieve and expose internal responses.

Affected context

The issue occurs in PraisonAI deployments that use SpiderTools operations such as page scraping, crawling, link extraction, text extraction, or URL-mention fetching. It becomes risky when an agent can process attacker-influenced URLs and the URL validation policy does not evaluate the address produced by DNS resolution before connecting.

Exploit preconditions

  • Attack surface: Agent-enabled URL fetching through SpiderTools
  • Required access: Ability to provide or influence a hostname submitted to an agent operation
  • Trigger point: DNS resolution and outbound connection performed after URL validation
  • Why exploitation is possible: Host filtering evaluates literal hostname encodings but does not sufficiently verify the resolved destination, allowing a public-looking hostname to route requests to protected address ranges

Why this happens

The underlying bug is an incomplete SSRF defense in which hostname validation is performed before resolving the hostname to its network destination. Because DNS answers are not incorporated into the allow-or-deny decision, a hostname controlled by an attacker can resolve to loopback, private, link-local, or cloud-metadata addresses while appearing acceptable in its literal form. This behavior maps to CWE-918: Server-Side Request Forgery.

Potential impact

  • Internal services may receive requests originating from the PraisonAI runtime
  • Cloud instance metadata or temporary credentials could be exposed
  • Private network information may be disclosed through agent responses
  • Internal administrative interfaces could be queried
  • Retrieved content could influence agent behavior or downstream decisions

General mitigation guidance

Mitigation generally focuses on validating the actual network destination and reducing trust in agent-supplied URLs.

Common defensive patterns include:

  • Resolve hostnames and validate every resulting address against denylisted and allowlisted network ranges before connecting
  • Re-check destinations across connection and redirect handling paths
  • Prefer explicit outbound allowlists for domains, protocols, ports, and destinations
  • Disable access to loopback, private, link-local, and cloud-metadata networks by default
  • Route agent traffic through controlled egress proxies or isolated network segments
  • Apply least-privilege network policies and avoid exposing sensitive responses to agents
  • Treat fetched content as untrusted input and constrain how it can affect tools or subsequent actions

How teams detect issues like this

Detection approaches can include:

  • Static analysis and code review for hostname checks that occur without post-resolution IP validation
  • Review of HTTP clients, redirect handlers, and URL-fetching tools for unrestricted outbound connections
  • Tests using controlled hostnames that resolve to loopback, private, link-local, and metadata address ranges
  • Egress monitoring for agent processes contacting internal address spaces or metadata endpoints
  • Policy enforcement requiring outbound allowlists and blocking sensitive network ranges at the platform layer
  • Automated security review tools that flag URL fetchers lacking destination validation

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-vxgj-xg5c-p4h7

Frequently asked

questions

It can be, when an attacker can influence a hostname supplied to an agent with access to SpiderTools URL-fetching functionality. Exploitation does not require a DNS rebinding race if the attacker-controlled hostname resolves directly to a protected address.

The attacker generally needs a way to submit or cause the agent to process a URL. The practical scope also depends on outbound network access, egress controls, and whether fetched responses are returned to the attacker or exposed through agent output.

Validate the resolved destination address before connecting, restrict redirects and protocols, and use an explicit outbound allowlist where possible. Network-level egress controls should provide an additional enforcement layer.

Treat all agent-provided URLs as untrusted, test URL-fetching code against protected address ranges, block metadata and private networks by policy, and continuously monitor outbound requests from agent runtimes.

Find out what's already
exploitable in your codebase.