Skip to main content

Python CVE-2026-39306

HIGH
Path Traversal (CWE-22)
2026-04-06 https://github.com/MervinPraison/PraisonAI GHSA-4rx4-4r3x-6534
7.3
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
7.3 HIGH
AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Updated
Apr 16, 2026 - 01:59 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Apr 16, 2026 - 01:47 vuln.today
cvss_changed
Patch released
Apr 07, 2026 - 02:30 nvd
Patch available
Analysis Generated
Apr 06, 2026 - 23:31 vuln.today
CVE Published
Apr 06, 2026 - 23:09 nvd
HIGH 7.3

DescriptionGitHub Advisory

Summary

PraisonAI's recipe registry pull flow extracts attacker-controlled .praison tar archives with tar.extractall() and does not validate archive member paths before extraction. A malicious publisher can upload a recipe bundle that contains ../ traversal entries and any user who later pulls that recipe will write files outside the output directory they selected.

This is a path traversal / arbitrary file write vulnerability on the client side of the recipe registry workflow. It affects both the local registry pull path and the HTTP registry pull path. The checksum verification does not prevent exploitation because the malicious traversal payload is part of the signed bundle itself.

Details

The issue is caused by unsafe extraction of tar archive contents during recipe pull.

  1. A malicious publisher creates a valid .praison bundle whose manifest.json is benign enough to pass publish, but whose tar members include traversal entries such as:
text
../../escape-http.txt
  1. LocalRegistry.publish() in src/praisonai/praisonai/recipe/registry.py:214-287 only reads manifest.json, calculates a checksum, and stores the uploaded bundle. It does not inspect or sanitize the rest of the tar members before saving the archive.
  2. When a victim later pulls the recipe from a local registry, LocalRegistry.pull() in src/praisonai/praisonai/recipe/registry.py:289-345 extracts the tarball directly:
python
recipe_dir = output_dir / name
recipe_dir.mkdir(parents=True, exist_ok=True)

with tarfile.open(bundle_path, "r:gz") as tar:
    tar.extractall(recipe_dir)
  1. The HTTP client path is also vulnerable. HttpRegistry.pull() in src/praisonai/praisonai/recipe/registry.py:691-739 downloads the bundle and then performs the same unsafe extraction:
python
recipe_dir = output_dir / name
recipe_dir.mkdir(parents=True, exist_ok=True)

with tarfile.open(bundle_path, "r:gz") as tar:
    tar.extractall(recipe_dir)
  1. Because no archive member validation is performed, traversal entries escape recipe_dir and create files elsewhere on disk.

Verified vulnerable behavior:

  • Published recipe name: evil-http
  • Victim-selected output directory: /tmp/praisonai-pull-traversal-poc/victim-output
  • Artifact created outside that directory: /tmp/praisonai-pull-traversal-poc/escape-http.txt
  • Artifact contents: owned over http

This demonstrates that a remote publisher can cause filesystem writes outside the pull destination chosen by another user.

PoC

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

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

Expected vulnerable output:

text
[+] Publish result: {'ok': True, 'name': 'evil-http', 'version': '1.0.0', ...}
[+] Pull result: {'name': 'evil-http', 'version': '1.0.0', ...}
[+] Outside artifact exists: True
[+] Artifact also inside output dir: False
[+] Outside artifact content: 'owned over http\n'
[+] RESULT: VULNERABLE - pulling the recipe created a file outside the chosen output directory.

Then verify the created file manually:

bash
ls -l /tmp/praisonai-pull-traversal-poc/escape-http.txt
cat /tmp/praisonai-pull-traversal-poc/escape-http.txt
find /tmp/praisonai-pull-traversal-poc -maxdepth 3 | sort

What the script does internally:

  1. Starts a local PraisonAI recipe registry server.
  2. Builds a malicious .praison bundle containing the tar entry ../../escape-http.txt.
  3. Publishes the malicious bundle to the local HTTP registry.
  4. Simulates a victim pulling that recipe into /tmp/praisonai-pull-traversal-poc/victim-output.
  5. Confirms that the file is created outside the chosen output directory.

Impact

This is a path traversal / arbitrary file write vulnerability in the recipe pull workflow.

Impacted parties:

  • Users who pull recipes from an untrusted or shared PraisonAI registry.
  • Teams running internal registries where one publisher can influence what other users pull.
  • Automated systems or CI jobs that fetch recipes into working directories near sensitive project files.

Security impact:

  • Integrity impact is high because an attacker can create or overwrite files outside the expected extraction directory.
  • Availability impact is significant if the overwritten target is a config file, project file, startup script, or another operational artifact.
  • The issue crosses a real security boundary because the attacker only needs to publish a malicious recipe, while the victim triggers the write by pulling it.

Remediation

  1. Replace raw tar.extractall() with a safe extraction routine that validates every TarInfo member before extraction. Reject absolute paths, .. segments, and any resolved path that escapes the intended extraction directory.
  2. Apply the same archive member validation in both LocalRegistry.pull() and HttpRegistry.pull() so that local and remote registry clients share the same safety guarantees.
  3. Consider validating tar contents during publish as well, so malicious bundles are rejected before they ever enter the registry and cannot be served to downstream users.

AnalysisAI

Arbitrary file write in PraisonAI's recipe registry allows malicious publishers to overwrite files outside intended directories when victims pull recipes. Affects all users pulling recipes from shared or untrusted registries via both local and HTTP transports. The vulnerability stems from unsafe tar.extractall() calls that process attacker-controlled path traversal sequences (../) embedded in .praison bundle archives. Exploitation requires low-privilege publisher access and user interaction (victim must pull the malicious recipe), but no special client configuration. EPSS score of 0.04% suggests low automated exploitation probability, though a working proof-of-concept exists demonstrating file creation outside victim-selected output directories. Vendor patch available in release v4.5.113.

Technical ContextAI

PraisonAI implements a recipe registry system where users can publish and pull AI workflow bundles packaged as .praison tar.gz archives. The registry code (src/praisonai/praisonai/recipe/registry.py) uses Python's tarfile module to extract these archives during pull operations. The vulnerability exploits Python tarfile's default behavior where extractall() honors path components in archive member names without validation. When a tar archive contains entries like '../../escape-http.txt', extractall() will traverse up from the intended extraction directory and write to arbitrary filesystem locations. This is a classic instance of CWE-22 (Path Traversal) in archive extraction contexts. Both LocalRegistry.pull() (lines 289-345) and HttpRegistry.pull() (lines 691-739) share identical vulnerable code patterns. The publish workflow only validates manifest.json checksums but performs no inspection of other tar members, allowing malicious traversal payloads to pass through undetected. This creates an asymmetric attack where publishers can inject malicious archives that weaponize the pull operation performed by other users.

RemediationAI

Upgrade to PraisonAI v4.5.113 or later, released by the vendor to address this vulnerability (https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113). The fix implements safe tar extraction that validates archive member paths before extraction, rejecting absolute paths, parent directory references (..), and any resolved paths escaping the intended directory. Installation command: pip install --upgrade praisonai>=4.5.113. If immediate upgrade is not feasible, implement the following compensating controls: (1) Restrict recipe registry publish access to thoroughly vetted trusted users only, eliminating the low-privilege publisher attack vector. (2) Pull recipes only from vendor-controlled or internally audited registries, never from public or community-contributed sources. (3) Execute recipe pull operations in isolated containers or sandboxed environments where filesystem writes cannot affect production systems - note this adds operational complexity and may break workflows expecting persistent recipe storage. (4) Implement filesystem monitoring to detect unexpected file creation outside designated recipe directories, though this is detective rather than preventive. (5) For CI/CD environments, run recipe pulls under dedicated service accounts with write permissions restricted to specific recipe storage paths only. These workarounds significantly reduce attack surface but do not eliminate the vulnerability - upgrade remains the definitive fix. Advisory URL: https://github.com/advisories/GHSA-4rx4-4r3x-6534.

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-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-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

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-2026-55255 HIGH POC
8.4 Jun 19

Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing

Share

CVE-2026-39306 vulnerability details – vuln.today

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