/

CVE-2026-55532

Severity:

HIGH RISK

(7.6)

Origin Validation Bypass (CWE-346) in PraisonAI MCP

CVE-2026-55532

Deferred

Vulnerability type

Category:

Origin Validation Bypass

CWE:

CWE-346, CWE-352

Impact:

Unauthorized MCP tool execution and persistent file modification

Severity:

HIGH RISK

(7.6)

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

A server-side origin validation weakness in PraisonAI's MCP HTTP Stream handling can allow an attacker-controlled web origin to satisfy a localhost allowlist. Under deployments that expose the MCP endpoint without additional authentication or request protections, a webpage may invoke tools and potentially write files that persist agent instructions.

Affected context

The issue occurs in PraisonAI deployments using the MCP HTTP Stream interface before origin validation was corrected. Risk is higher when the endpoint is reachable by browser-based requests, relies on a localhost origin allowlist, permits simple requests without preflight enforcement, and does not require an API key or equivalent authentication for tool invocation.

Exploit preconditions

  • Attack surface: MCP HTTP Stream endpoint accessible from a browser or web page
  • Required access: Ability to cause a user's browser or another HTTP client to send requests to the endpoint
  • Trigger point: Origin validation performed during MCP request handling
  • Security condition: The validation logic treats a trusted origin as a prefix rather than requiring an exact, trusted-origin match
  • Additional exposure: Tool calls remain available without strong request authentication or equivalent authorization controls
  • Why exploitation is possible: An attacker-controlled origin can be accepted as trusted, while simple request content types may avoid browser preflight protections

Why this happens

The underlying bug is an origin comparison flaw. Using a prefix-based check such as startswith for an allowlist can accept domains that merely begin with a trusted hostname, rather than limiting access to the exact origin and its permitted scheme and port.

This maps primarily to CWE-346: Origin Validation Error. The browser-facing request behavior also relates to CWE-352: Cross-Site Request Forgery, because insufficient origin and authorization controls may allow a third-party webpage to cause state-changing requests in a user's browser context.

Potential impact

  • An attacker could invoke exposed MCP tools without the intended API-key protection
  • Unauthorized tool operations may alter application or agent state
  • File-writing tools could persist malicious or misleading agent instructions
  • Agent behavior, workflows, or downstream results could be manipulated
  • The affected service or connected resources may experience data integrity or confidentiality impacts

General mitigation guidance

Mitigation generally focuses on exact origin validation, strong authorization, and reducing browser-driven state changes.

Common defensive patterns include:

  • Compare normalized scheme, host, and port values against an explicit trusted-origin set rather than using prefix matching
  • Require authentication and authorization for every tool invocation, including requests from local or trusted-looking origins
  • Use anti-CSRF protections with server-side token validation for browser-accessible state-changing endpoints
  • Restrict or disable browser access to MCP endpoints when it is not required
  • Accept only the request content types and methods required by the protocol, while not treating preflight behavior as the sole security control
  • Apply least privilege to file-writing tools and isolate agent instruction stores from sensitive resources
  • Use secure defaults that deny unknown origins and require explicit endpoint exposure

How teams detect issues like this

Organizations can look for:

  • Static analysis rules identifying prefix, substring, or loosely normalized origin comparisons
  • Code review findings where origin checks are used without authentication, CSRF protection, or exact scheme-host-port matching
  • Tests covering attacker-controlled domains that share a trusted hostname prefix
  • Integration tests verifying that simple cross-origin requests cannot invoke state-changing tools without authorization
  • Runtime logs for rejected and accepted origins, unauthenticated tool calls, unusual file writes, and unexpected instruction changes
  • Policy checks requiring explicit trusted-origin inventories and authenticated access for administrative or tool-execution endpoints

Automated security review tools may help identify weak origin comparisons and missing authorization checks.

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-pvph-5j39-v8qc

Frequently asked

questions

It can be exploitable through a browser or HTTP client when the MCP HTTP Stream endpoint is reachable and its tool operations lack sufficient authentication or authorization. Exposure depends on deployment network controls and endpoint configuration.

The vulnerable behavior is most concerning when tool calls can be processed without an API key or equivalent authorization. Deployments that enforce strong authentication may substantially limit exploitability, although origin validation should still be corrected.

Use exact, normalized origin matching against an explicit allowlist, then require independent authentication and authorization for every state-changing tool request. Add CSRF protections where browser access is necessary.

Treat origin checks as one defense layer rather than an access-control substitute, test untrusted lookalike origins, deny unknown origins by default, and monitor sensitive tool calls and file modifications.

Find out what's already
exploitable in your codebase.