Skip to main content

Python CVE-2026-39308

HIGH
Path Traversal (CWE-22)
2026-04-06 https://github.com/MervinPraison/PraisonAI GHSA-r9x3-wx45-2v7f
7.1
CVSS 3.1 · Vendor: https://github.com/MervinPraison/PraisonAI
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain publish credentials
  2. Delivery
    Craft malicious .praison bundle with '../' in manifest
  3. Exploit
    POST to legitimate-looking /v1/recipes/{name}/{version} endpoint
  4. Execution
    Server extracts manifest and writes outside registry root
  5. Persist
    Overwrite adjacent application files or plant malicious artifacts
  6. Impact
    Server returns HTTP 400 but file persists on disk

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target deployment has enabled the PraisonAI recipe registry server with the publish endpoint exposed to network clients, which is not a default feature in all PraisonAI installations-many deployments use only the AI agent orchestration features without running a recipe registry. The attacker must possess valid publish credentials, either a configured API token (if the registry requires authentication) or network access to a registry intentionally run without token protection (mentioned in the description as a possible but insecure deployment mode). No user interaction is required (UI:N). Attack complexity is low (AC:L) because the path traversal is straightforward-no race conditions, cryptographic bypasses, or complex timing requirements. The vulnerability is exploitable against default configurations of the recipe registry server component when publish access is granted, but is NOT exploitable against PraisonAI deployments that do not expose or enable the registry server. Exploitation is limited by the filesystem permissions of the registry process-the attacker can only write to paths writable by that service account, not arbitrary system-wide locations.

Impact

Real-world risk is moderate despite the 7.1 CVSS score. The CVSS vector (AV:N/AC:L/PR:L/UI:N) indicates network-accessible exploitation with low complexity, but requires authentication (PR:L), which significantly constrains the attack surface compared to unauthenticated flaws. The low EPSS score (0.06%, 18th percentile) suggests security researchers and attackers have not prioritized this vulnerability class in PraisonAI deployments, likely because recipe registry publish endpoints are typically not exposed to untrusted users in production. The integrity impact (I:H) is legitimate-attackers can overwrite arbitrary files the registry process can write to-but practical exploitation requires knowing target filesystem layout and having valid publish credentials. Availability impact (A:L) is limited to potential DoS via disk exhaustion or corrupting adjacent application files. No CISA KEV listing, no public exploit code identified beyond the researcher's PoC, and the vendor responded with a patch in version 4.5.113. This is a priority for organizations that expose PraisonAI recipe registries with token-based publish access to semi-trusted or compromised accounts, but not an immediate crisis for typical deployments where the registry is internal-only or disabled.

Exploit ScenarioDerived

An authenticated attacker with valid PraisonAI recipe registry publish credentials crafts a malicious .praison tarball containing a manifest.json with name field set to '../../sensitive-app/malicious' and version '1.0.0'. They upload this bundle via POST to /v1/recipes/legitimate/1.0.0. The registry server extracts the manifest, constructs the path recipes_path/../../sensitive-app/malicious/1.0.0/, creates the directory structure outside the registry root, and writes malicious-1.0.0.praison before detecting the name/version mismatch and returning HTTP 400. The attacker now has a planted file in the sensitive-app directory that could overwrite configuration files, inject malicious code later loaded by another service, or fill disk space. The researcher-provided PoC demonstrates this with /tmp/praisonai-publish-traversal-poc/outside-dir-1.0.0.praison written outside the intended registry tree.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Apr 16, 2026

Path traversal in PraisonAI's recipe registry publish endpoint allows authenticated users with publish access to write arbitrary files outside the configured registry root. The vulnerability affects the pip package 'praisonai' and stems from trusting attacker-controlled manifest.json name/version fields before validation, enabling directory traversal sequences like '../../' to bypass intended storage boundaries. While the malicious publish request returns HTTP 400, the out-of-bounds file write persists on disk. EPSS exploitation probability is low (0.06%, 18th percentile) with no active exploitation reported. Vendor patch available in version 4.5.113.

Earlier versions of this analysis (1)
v1 Apr 06, 2026 - 23:31 CVSS 7.1

Path traversal in PraisonAI recipe registry (<=4.5.112) allows authenticated publishers to write arbitrary files outside the registry root via malicious bundle manifests. The publish endpoint (POST /v1/recipes/{name}/{version}) extracts and writes uploaded recipe bundles using attacker-controlled name and version fields from the bundle's internal manifest.json before validating them against the HTTP route parameters. By embedding directory traversal sequences (e.g., ../../outside-dir) in the manifest, an attacker can create files in arbitrary filesystem locations on the registry host, even though the request ultimately returns HTTP 400. This represents an authenticated arbitrary file write vulnerability (CVSS 7.1, AV:N/AC:L/PR:L) affecting any deployment exposing the recipe registry publish flow. EPSS data not available; no confirmed active exploitation or public exploit code identified beyond researcher PoC at time of analysis.

RemediationAI

Upgrade PraisonAI to version 4.5.113 or later, which addresses the path traversal issue (release notes at https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113, advisory at https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-r9x3-wx45-2v7f). For environments that cannot immediately upgrade, implement defense-in-depth mitigations: (1) Disable the recipe registry publish endpoint entirely if not required for operations-this eliminates the attack surface with no functional loss for deployments that only consume recipes. (2) If publish functionality is necessary, restrict network access to the registry server to trusted internal networks only via firewall rules or reverse proxy ACLs, and revoke publish tokens for any non-essential accounts-this reduces PR:L to a smaller set of highly trusted users but does not eliminate risk from compromised or malicious insiders. (3) Run the registry process under a dedicated service account with write permissions only to the registry root directory and no access to adjacent application or system directories-this contains the blast radius of arbitrary writes, though attackers may still cause DoS via disk exhaustion within the registry directory. Note that input validation alone (checking for '../' in manifest fields) is insufficient if not combined with path canonicalization checks, as the patch properly implements.

Affected Packages

pypi praisonai fix: 4.5.113

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PraisonAI implements a recipe registry system where users can publish recipe bundles as .praison tarball files containing a manifest.json descriptor. The publish flow in RegistryServer._handle_publish() accepts POST requests to /v1/recipes/{name}/{version}, extracts the uploaded tarball, and calls LocalRegistry.publish() which immediately uses the manifest's name and version fields to construct filesystem paths via Python's pathlib: 'recipe_dir = self.recipes_path / name / version'. This path concatenation occurs before validation helpers (_validate_name(), _validate_version()) are invoked, creating a classic TOCTOU (time-of-check-time-of-use) vulnerability. The CWE-22 path traversal arises because unsanitized path components containing '../' sequences are passed directly to Path.mkdir() and shutil.copy2(), allowing writes outside self.recipes_path. The subsequent URL-to-manifest consistency check correctly rejects mismatched requests with HTTP 400 and attempts cleanup via registry.delete(), but by that point the traversed file already exists on disk outside the registry root, where the cleanup logic cannot reach it.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/MervinPraison/PraisonAI) PRIMARY 7.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

Primary rating from Vendor (https://github.com/MervinPraison/PraisonAI) · only source for this CVE.

CVSS VectorVendor: https://github.com/MervinPraison/PraisonAI

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

Lifecycle Timeline

3
Analysis Updated
Apr 16, 2026 - 01:47 vuln.today
v2 - CVSS changed
Patch released
Apr 07, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 06, 2026 - 23:09 nvd
HIGH 7.1

DescriptionCVE.org

Summary

PraisonAI's recipe registry publish endpoint writes uploaded recipe bundles to a filesystem path derived from the bundle's internal manifest.json before it verifies that the manifest name and version match the HTTP route. A malicious publisher can place ../ traversal sequences in the bundle manifest and cause the registry server to create files outside the configured registry root even though the request is ultimately rejected with HTTP 400.

This is an arbitrary file write / path traversal issue on the registry host. It affects deployments that expose the recipe registry publish flow. If the registry is intentionally run without a token, any network client that can reach the service can trigger it. If a token is configured, any user with publish access can still exploit it.

Details

The bug is caused by the order of operations between the HTTP handler and the registry storage layer.

  1. RegistryServer._handle_publish() in src/praisonai/praisonai/recipe/server.py:370-426 parses POST /v1/recipes/{name}/{version}, writes the uploaded .praison file to a temporary path, and immediately calls:
python
result = self.registry.publish(tmp_path, force=force)
  1. LocalRegistry.publish() in src/praisonai/praisonai/recipe/registry.py:214-287 opens the uploaded tarball, reads manifest.json, and trusts the attacker-controlled name and version fields:
python
name = manifest.get("name")
version = manifest.get("version")
recipe_dir = self.recipes_path / name / version
recipe_dir.mkdir(parents=True, exist_ok=True)
bundle_name = f"{name}-{version}.praison"
dest_path = recipe_dir / bundle_name
shutil.copy2(bundle_path, dest_path)
  1. Validation helpers already exist in the same file:
python
def _validate_name(name: str) -> bool:
def _validate_version(version: str) -> bool:

but they are not called before the filesystem write.

  1. Only after publish() returns does the route compare the manifest values with the URL values:
python
if result["name"] != name or result["version"] != version:
    self.registry.delete(result["name"], result["version"])
    return self._error_response(...)

At that point the out-of-root artifact has already been created. The request returns an error, but the write outside the registry root remains on disk.

Verified vulnerable behavior:

  • Request path: /v1/recipes/safe/1.0.0
  • Internal manifest name: ../../outside-dir
  • Server response: HTTP 400
  • Leftover artifact: /tmp/praisonai-publish-traversal-poc/outside-dir-1.0.0.praison

This demonstrates that the write occurs before the consistency check and rollback.

PoC

Run the single verification script from the checked-out repository:

bash
cd "/Users/r1zzg0d/Documents/CVE hunting/targets/PraisonAI"
python3 tmp/pocs/poc.py

Expected vulnerable output:

text
[+] Publish response status: 400
{
  "ok": false,
  "error": "Bundle name/version (../../outside-dir@1.0.0) doesn't match URL (safe@1.0.0)",
  "code": "error"
}
[+] Leftover artifact exists: True
[+] Artifact under registry root: False
[+] RESULT: VULNERABLE - upload was rejected, but an out-of-root artifact was still created.

Then verify the artifact manually:

bash
ls -l /tmp/praisonai-publish-traversal-poc/outside-dir-1.0.0.praison
find /tmp/praisonai-publish-traversal-poc -maxdepth 2 | sort

What the script does internally:

  1. Starts a local PraisonAI recipe registry server.
  2. Builds a malicious .praison bundle whose internal manifest.json contains name = ../../outside-dir.
  3. Uploads that bundle to the apparently safe route /v1/recipes/safe/1.0.0.
  4. Receives the expected 400 mismatch error.
  5. Confirms that outside-dir-1.0.0.praison was still written outside the configured registry directory.

Impact

This is a path traversal / arbitrary file write vulnerability in the recipe registry publish flow.

Impacted parties:

  • Registry operators running the PraisonAI recipe registry service.
  • Any deployment that allows remote recipe publication.
  • Any environment where adjacent writable filesystem locations contain sensitive application data, service files, or staged content that could be overwritten or planted.

Security impact:

  • Integrity impact is high because an attacker can create or overwrite files outside the registry root.
  • Availability impact is possible if the attacker targets adjacent runtime or application files.
  • The issue can be chained with other local loading or deployment behaviors if nearby files are later consumed by another component.

Remediation

  1. Validate manifest.json name and version before any path join or filesystem write. Reject path separators, .., absolute paths, and any value that fails the existing _validate_name() / _validate_version() checks.
  2. Resolve the final destination path and enforce that it remains under the configured registry root before calling mkdir() or copy2(). For example, compare the resolved destination against self.recipes_path.resolve().
  3. Move the URL-to-manifest consistency check ahead of self.registry.publish(...), or refactor publish() so it receives already-validated route parameters instead of trusting attacker-controlled manifest values for storage paths.

Executive ViewAI

Why It Matters

PraisonAI versions prior to 4.5.113 contain a path traversal vulnerability in the recipe registry publish endpoint that allows authenticated users to write arbitrary files outside the configured storage directory, potentially compromising system integrity and enabling privilege escalation or code execution through placement of malicious files in sensitive locations.

Business Impact: Medium
Compensating Controls

Apply vendor patch. If immediate patching is not feasible: restrict publish endpoint access to minimal set of trusted accounts; implement file system monitoring for unauthorized writes outside registry root directory; enforce strict file permissions on registry storage directories to limit post-write exploitation impact; disable recipe registry publish functionality if not operationally required.

Threat Intelligence Overview

EPSS Score
0.1%
Top 82% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Affected Products (CPE)CVE.org

pkg:pip/praisonai

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy