/

CVE-2026-34953

Severity:

CRITICAL RISK

(9.1)

Missing Authorization / Authentication Bypass

CVE-2026-34953

Analyzed

Vulnerability type

Category:

Missing Authorization / Authentication Bypass

CWE:

CWE-863

Impact:

Full Unauthorized Access to MCP Server Tools and Agent Capabilities

Severity:

CRITICAL RISK

(9.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's OAuthManager.validate_token() treats any unknown Bearer token as valid, effectively bypassing authentication when the internal token store is empty (the default state).

As a result, any HTTP request to the MCP server bearing an arbitrary token is accepted as authenticated, granting full access to registered tools and agent capabilities under conditions where token presence is the only gate.

Affected context

This vulnerability affects PraisonAI deployments using the MCP server where:

  • OAuthManager is configured to validate Bearer tokens for incoming HTTP requests, and
  • The internal token store is empty or does not contain the presented token, and
  • No additional access control checks are performed beyond validate_token().

In such configurations, the system implicitly trusts any token that cannot be found in its store, so unauthenticated clients can gain what appears to be fully authenticated access to the MCP server's tools and multi-agent capabilities.

Exploit preconditions

  • Attack surface: HTTP interface of the PraisonAI MCP server.
  • Required access: Network-level ability to send HTTP requests to the MCP endpoint.
  • Authentication state: No valid token or credentials are actually needed; the attacker can supply any arbitrary Bearer token value.
  • Trigger point: The OAuthManager.validate_token() call during request processing when the provided token is not present in the internal store (including when the store is empty by default).
  • Why exploitation is possible: The validation logic returns True on token-miss conditions instead of rejecting unknown or absent tokens, effectively inverting the intended authorization decision and treating unknown tokens as valid.

Why this happens

The underlying bug is a flawed authorization decision in the token validation logic, corresponding to CWE-863: Incorrect Authorization.

Instead of treating an unknown or missing token as invalid, OAuthManager.validate_token() returns True when the token is not found in the internal store.

This creates a logic pathway where the failure to locate credentials results in granting access.

At an abstract level, this pattern is:

  • An access control mechanism that interprets "no match" or "no policy" as "allow,"
  • A missing explicit deny default for unrecognized tokens, and
  • Reliance on the presence of a token, without verifying its legitimacy against a trusted registry or issuer.

Potential impact

  • Full unauthorized use of all registered tools exposed via the MCP server.
  • Execution of arbitrary agent actions, including data access, transformation, or external API calls performed by agents.
  • Exposure of sensitive data processed or retrieved by agents and tools.
  • Manipulation of workflows, automation routines, or multi-agent coordination to produce malicious outcomes.
  • Use of the MCP server as a pivot or automation platform for further attacks within integrated environments.

General mitigation guidance

Effective mitigation focuses on enforcing strict, fail-closed authorization behavior and robust token validation:

  • Ensure that token validation logic explicitly denies access when a token is not found or cannot be verified, treating unknown or missing tokens as invalid by default.
  • Implement a clear separation between authentication (verifying who the caller is) and authorization (what they may do), and require both steps for MCP actions.
  • Validate Bearer tokens against a trusted source, such as an OAuth2/OpenID Connect provider, using standard token verification (signature, issuer, audience, expiration).
  • Introduce defense-in-depth with additional access controls, such as per-tool or per-agent permission checks, rather than relying solely on a single token check.
  • Configure deployments to minimize exposure of the MCP server to untrusted networks, and use network-level controls (firewalls, API gateways, service meshes) to restrict who can reach the interface.
  • Apply least-privilege principles to agent and tool capabilities so that even valid tokens do not grant unnecessary breadth of control.

How teams detect issues like this

Detection typically involves examining both the codebase and runtime behavior for incorrect authorization defaults:

  • Static analysis and code review:
  • Look for authorization functions that return True or "allow" when a user, token, or policy is not found.
  • Identify conditional branches where negative conditions (e.g., token not found) fall through to an allow path.
  • Flag constructs where authentication checks do not verify token signatures, issuers, or expiration.
  • Policy and configuration review:
  • Review security configuration to ensure the MCP server is not exposed broadly to public networks without additional protections.
  • Confirm that authorization middleware cannot be bypassed or disabled inadvertently.
  • Runtime monitoring and logging:
  • Enable detailed logs for authentication and authorization decisions, including reason codes (e.g., "token not found," "token invalid").
  • Monitor for successful "authenticated" requests using unknown, malformed, or obviously synthetic Bearer tokens.
  • Use API gateways or WAF rules to detect abnormal patterns of token values or high-volume probing with different tokens.
  • Automated security testing tools can be configured to probe endpoints with arbitrary or invalid tokens and alert if access is still granted.

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-98f9-fqg5-hvq5

Frequently asked

questions

Yes. If the MCP server is reachable over the network, an attacker can send requests with any arbitrary Bearer token and be treated as authenticated, without needing valid credentials.

The attacker only needs network access to the MCP server's HTTP interface. No prior authentication or knowledge of valid tokens is required because any unknown token is accepted.

Adopt a fail-closed authorization model: treat any unknown, missing, or unverifiable token as invalid and deny access. Ensure token validation includes proper verification against a trusted authority and that no "allow on not found" branches exist in the authorization logic.

Use well-tested, standard authentication and authorization frameworks; enforce security code reviews focusing on default-deny behavior; add automated checks for inverted logic in access control decisions; and regularly test endpoints with invalid tokens to confirm they are correctly rejected.

Find out what's already
exploitable in your codebase.