High

PraisonAI recipe registry publish path traversal allows out-of-root file write

  • Disclosed: 06.04.2026
  • Updated: 11.10.2026 14:18

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:

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

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) praisonai < 4.5.113 4.5.113

References

CVSS score 7.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
Weakness (CWE)
CWE-22
Platform
Python (PyPI)
Package
praisonai
Disclosed
06.04.2026
Updated
11.10.2026 14:18

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-2922 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-r9x3-wx45-2v7f - CC BY 4.0

Vulnerability history: praisonai

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (104) in the archive
Total entries
104
First → latest
04.2026 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 27
  • High 60
  • Medium 17

Disclosures per year

  1. 2026: 104
Severity:
  1. High · 7.5 CVE-2026-61439 < 4.6.78 4.6.78
  2. High · 7.3 CVE-2026-56839 < 4.6.59 4.6.59
  3. High · 7.2 CVE-2026-57114 >= 4.5.126, < 4.6.59 4.6.59
  4. Critical · 9.8 CVE-2026-57125 < 4.6.59 4.6.59
  5. High · 8.8 CVE-2026-57117 >= 4.6.10, < 4.6.59 4.6.59
  6. High · 7.8 CVE-2026-56838 >= 4.5.87, < 4.6.59 4.6.59
  7. High · 8.3 CVE-2026-56835 >= 3.11.0, < 4.6.59 4.6.59
  8. High · 8.2 CVE-2026-56836 >= 4.5.112, < 4.6.59 4.6.59
  9. High CVE-2026-47397 < 4.6.40 4.6.40
  10. Critical · 9.8 CVE-2026-41497 < 4.5.149 4.5.149
  11. Critical · 9.8 CVE-2026-40288 < 4.5.139 4.5.139
  12. High · 8.4 CVE-2026-40287 < 4.5.139 4.5.139
  13. Critical · 9.3 CVE-2026-40154 < 4.5.128 4.5.128
  14. Critical · 9.6 CVE-2026-40088 < 4.5.121 4.5.121
  15. High · 8.8 CVE-2026-39891 < 4.5.115 4.5.115
  16. Critical CVE-2026-35615 < 1.5.113 1.5.113
  17. PraisonAI recipe registry publish path traversal allows out-of-root file write this entry
    High · 7.1 CVE-2026-39308 < 4.5.113 4.5.113
  18. High · 8.1 CVE-2026-39307 < 4.5.113 4.5.113
  19. Critical · 9.1 CVE-2026-34953 < 4.5.97 4.5.97
  20. Critical · 9.1 CVE-2026-34952 < 4.5.97 4.5.97
  21. High · 7.7 CVE-2026-34936 < 4.5.90 4.5.90
  22. Critical · 9.8 CVE-2026-34934 < 4.5.90 4.5.90
  23. Critical · 9.8 CVE-2026-34935 >= 4.5.15, < 4.5.69 4.5.69

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.