MISFIRE

Browse / AI Framework and Platform Flaws / CVE-2026-39306

PraisonAI recipe registry pull path traversal writes files outside the chosen output directory

CVE-2026-39306 ยท 2026-04-06 high

Class
AI Framework and Platform Flaws (filed by a model that read the source)
Technique
Path traversal and file access
Also involves
Unsafe Model Loading and Supply Chain
Affected
praisonai (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H
EPSS
0.3% chance of exploitation in 30 days

How it works, in short

A recipe bundle whose tar archive contains parent-directory entries makes the client extract files outside the chosen output folder when pulled. (Our summary, written by a model. The source text is below.)

Details

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.

../../escape-http.txt
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)
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)

Verified vulnerable behavior:

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:

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

Expected vulnerable output:

[+] 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:

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:

Impact

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

Impacted parties:

Security impact:

Remediation

References

Source: GitHub Advisory Database, used under CC BY 4.0.