/

CVE-2026-34936

Severity:

HIGH RISK

(7.7)

SSRF in PraisonAI passthrough APIs

CVE-2026-34936

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Arbitrary outbound requests from the PraisonAI server (SSRF), potentially reaching internal or otherwise protected services

Severity:

HIGH RISK

(7.7)

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 passthrough() and apassthrough() helpers accept a caller-controlled api_base parameter that is concatenated with an endpoint and sent directly to httpx.Client.request() without proper validation.

When a particular code path is taken after an AttributeError, this behavior allows an attacker to induce the server to make arbitrary HTTP requests to hosts it can reach, enabling server-side request forgery (SSRF).

Affected context

This vulnerability appears in PraisonAI deployments that:

  • Expose passthrough() or apassthrough() functionality directly or indirectly to user-controlled inputs
  • Allow callers to influence the api_base parameter (either explicitly or through higher-level configuration)
  • Run within environments where the PraisonAI server can access internal network resources (e.g., cloud metadata services, internal APIs, admin panels)

The risk is elevated in setups where PraisonAI has network reachability to sensitive internal services or the public internet with privileged egress.

Exploit preconditions

  • Attack surface: Application endpoints or workflows that route user input into passthrough() or apassthrough(), especially any parameter that maps to api_base or indirectly controls the request target.
  • Required access: Ability to send requests to the PraisonAI-backed service (e.g., authenticated user of the system, compromised integration, or exposed API endpoint).
  • Trigger point: Code paths where the primary litellm integration raises AttributeError, causing the fallback branch that constructs a URL by concatenating api_base with the endpoint and passing it to httpx.Client.request().
  • Why exploitation is possible: The api_base value is used as part of the target URL with no URL scheme validation, no private IP or internal host filtering, and no domain or path allowlist, enabling attacker-controlled destinations for outbound HTTP requests.

Why this happens

The underlying bug is a classic server-side request forgery (SSRF) pattern (CWE-918). In the fallback logic for passthrough() and apassthrough(), the code:

  • Treats an externally influenced api_base parameter as a trustworthy URL base
  • Concatenates api_base with a relative endpoint to construct the final request target
  • Forwards this constructed URL directly to httpx.Client.request() without:
  • Enforcing an expected scheme (e.g., https-only)
  • Restricting hostnames or IP ranges
  • Applying an allowlist of approved domains or services

By failing to enforce a clear trust boundary for outbound HTTP destinations, the system allows an attacker to repurpose application-level HTTP capabilities to probe arbitrary network locations reachable from the server.

Potential impact

  • Discovery and probing of internal network services that are not directly exposed to the internet
  • Access to sensitive internal APIs (e.g., configuration services, message queues, or administrative backends)
  • Attempts to reach cloud metadata endpoints (such as instance metadata services) that may expose credentials or configuration data
  • Use of the PraisonAI server as an obfuscated proxy for external reconnaissance or limited attacks against third-party services
  • Potential pivoting into other internal systems if sensitive tokens, configuration, or service endpoints can be reached via HTTP

General mitigation guidance

Effective mitigation centers on treating outbound HTTP destinations as part of the application's attack surface and constraining them accordingly:

  • Constrain target hosts: Introduce a strict allowlist of domains or service endpoints that passthrough() and apassthrough() are permitted to reach, rejecting any api_base outside this set.
  • Validate URL schemes: Enforce that all outbound requests use an expected scheme (typically https) and reject or sanitize inputs that specify unsupported schemes or malformed URLs.
  • Normalize and parse URLs safely: Parse api_base using robust URL parsing utilities, normalize the result, and resolve hostnames/IPs before making requests; reject inputs that resolve to loopback, link-local, or private address ranges, where feasible.
  • Separate configuration from input: Treat api_base as a server-side configuration option rather than a user-supplied parameter wherever possible, removing direct user influence from the request target.
  • Apply network-level controls: Use firewall rules, service meshes, or egress policies to restrict where the application can initiate outbound HTTP requests, limiting possible damage if application-level checks fail.
  • Principle of least privilege: Ensure the runtime environment and credentials available to PraisonAI provide only the minimal network and data access needed for its intended functionality.

How teams detect issues like this

Identifying and monitoring for SSRF patterns typically involves both code-centric and operational techniques:

  • Static analysis and linters:
  • Flag constructs where user-influenced strings (e.g., request parameters, headers, configuration fields) are concatenated or interpolated into URLs passed to HTTP clients like httpx, requests, or similar libraries.
  • Identify code paths that build URLs by string concatenation rather than using structured URL builders.
  • Code review focus areas:
  • Review any helper methods that act as HTTP "passthrough" or "proxy" layers, ensuring they enforce controlled target destinations.
  • Check for absence of scheme validation, domain allowlists, or IP-range filtering when dealing with dynamic api_base or base_url parameters.
  • Runtime monitoring:
  • Log outbound HTTP requests made by PraisonAI, including destination host, scheme, and path; alert on requests to unexpected hosts, local addresses (127.0.0.0/8, ::1), or metadata-style endpoints.
  • Use network-level observability tools to watch for new or anomalous egress patterns from the PraisonAI environment.
  • Policy enforcement:
  • Introduce CI/CD gates that inspect code changes touching HTTP client usage and require explicit approval for introducing new dynamic destinations.
  • Employ application security testing tools (DAST or SSRF-focused scanners) to probe APIs with controlled payloads and detect unexpected request routing behavior.

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-x6m9-gxvr-7jpv

Frequently asked

questions

Yes, if an attacker can influence inputs that feed into passthrough() or apassthrough(), the vulnerability can be exploited remotely through the exposed PraisonAI APIs or integrated interfaces, subject to whatever authentication and access controls the deployment enforces.

The attacker must be able to trigger the vulnerable code path with control over the api_base value or an upstream parameter that maps to it. This typically means being an authenticated user of the system, but in some deployments the relevant endpoints might be exposed more broadly.

The most robust fix is to decouple outbound destinations from user input and enforce strict control over where passthrough-style functions can send requests. Concretely, treat api_base as a trusted configuration value, validate and normalize it using safe URL parsing, and restrict it to an allowlist of approved domains or services.

Adopt a design principle that no user-controlled data should directly determine outbound network destinations. Use structured URL builders, enforce scheme and host validation, apply network egress controls, and integrate static analysis and security-focused code review rules that flag dynamic base URLs or proxy-like behavior without proper validation.

Find out what's already
exploitable in your codebase.