GHSA-4rx4-4r3x-6534
HIGHGHSA-4rx4-4r3x-6534 is a high-severity (CVSS 7.3) Path Traversal vulnerability in praisonai. O3 Security confirms whether GHSA-4rx4-4r3x-6534 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
PraisonAI recipe registry pull path traversal writes files outside the chosen output directory
Real-World Exposure
praisonaiReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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.
- A malicious publisher creates a valid
.praisonbundle whosemanifest.jsonis benign enough to pass publish, but whose tar members include traversal entries such as:
../../escape-http.txt
-
LocalRegistry.publish()insrc/praisonai/praisonai/recipe/registry.py:214-287only readsmanifest.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. -
When a victim later pulls the recipe from a local registry,
LocalRegistry.pull()insrc/praisonai/praisonai/recipe/registry.py:289-345extracts the tarball directly:
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)
- The HTTP client path is also vulnerable.
HttpRegistry.pull()insrc/praisonai/praisonai/recipe/registry.py:691-739downloads the bundle and then performs the same unsafe extraction:
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)
- Because no archive member validation is performed, traversal entries escape
recipe_dirand 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:
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:
- Starts a local PraisonAI recipe registry server.
- Builds a malicious
.praisonbundle containing the tar entry../../escape-http.txt. - Publishes the malicious bundle to the local HTTP registry.
- Simulates a victim pulling that recipe into
/tmp/praisonai-pull-traversal-poc/victim-output. - 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
-
Replace raw
tar.extractall()with a safe extraction routine that validates everyTarInfomember before extraction. Reject absolute paths,..segments, and any resolved path that escapes the intended extraction directory. -
Apply the same archive member validation in both
LocalRegistry.pull()andHttpRegistry.pull()so that local and remote registry clients share the same safety guarantees. -
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | praisonai | all versions | 4.5.113 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for praisonai. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update praisonai to 4.5.113 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4rx4-4r3x-6534 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-4rx4-4r3x-6534 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-4rx4-4r3x-6534. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-4rx4-4r3x-6534 in your dependencies?
O3 detects GHSA-4rx4-4r3x-6534 across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.