Skip to main content

Python CVE-2026-39307

HIGH
Relative Path Traversal (CWE-23)
2026-04-06 https://github.com/MervinPraison/PraisonAI GHSA-4ph2-f6pf-79wv
8.1
CVSS 3.1 · Vendor: https://github.com/MervinPraison/PraisonAI
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Social engineer template trust
  2. Delivery
    User runs 'praisonai templates install'
  3. Exploit
    Download malicious ZIP from attacker repo
  4. Install
    Extract archive with path traversal entries
  5. C2
    Overwrite critical system/user files
  6. Execute
    Execute malicious code on victim login/script execution
  7. Impact
    Establish persistence or escalate privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Relative path traversal prevention
Exploitation Conditions

Requires victim to execute the PraisonAI CLI command 'praisonai templates install' with a template source controlled by the attacker (e.g., 'praisonai templates install github:attacker/malicious_repo'). The templates installation feature must be accessible and functional in the victim's environment. The vulnerability is exploitable on default PraisonAI configurations prior to version 4.5.113 without requiring special settings. Attack is limited by: (1) User interaction requirement (CVSS UI:R) - victim must actively choose to install the malicious template, making bulk automated exploitation infeasible. (2) Social engineering dependency - attacker must convince users the template source is trustworthy, typically through community reputation manipulation or typosquatting. (3) File system permissions - impact severity depends on victim's user privileges; writes are constrained to paths accessible by the user running PraisonAI. (4) Python version and OS - exploitation success may vary with zipfile library behavior across Python versions, though path traversal generally succeeds on major platforms (Linux, macOS, Windows).

Impact

CVSS 8.1 (High) reflects significant integrity and availability impact (I:H/A:H) from arbitrary file write capability, though real-world exploitation risk is tempered by multiple factors. The attack vector is network-based (AV:N) with low complexity (AC:L) but critically requires user interaction (UI:R) - victims must explicitly run 'praisonai templates install' with an attacker-controlled template source. No authentication is required (PR:N) from the attacker's perspective since they simply host a malicious repository. EPSS score of 0.04% (13th percentile) suggests minimal observed exploitation in the wild, likely because the attack requires social engineering specific to PraisonAI users rather than automated scanning. The vulnerability is NOT in CISA KEV, confirming no widespread active exploitation. However, the proof-of-concept demonstrates trivial exploit development, and the impact can escalate from file corruption to remote code execution if attackers overwrite Python files, shell scripts in PATH, or user dotfiles like .bashrc. The SSVC framework would rate this as 'attend' priority: exploitation requires user action (not automatable), technical impact is total (arbitrary write enables RCE), but no confirmed active exploitation. Primary risk is to data science/AI teams who regularly install community templates in development or production environments. The low EPSS despite high CVSS indicates this is a legitimate supply chain risk for PraisonAI users but not an internet-wide scanning target.

Exploit ScenarioDerived

An attacker creates a malicious GitHub repository containing a PraisonAI template with a crafted ZIP archive embedding path traversal entries like '../../../../home/user/.bashrc' or '../../../../usr/local/bin/startup.sh'. They promote this template through social engineering (forums, documentation issues, or typosquatting popular template names) to trick developers into running 'praisonai templates install github:attacker/malicious_template'. Upon execution, the vulnerable extractall() function writes attacker-controlled content outside the temporary directory, overwriting the victim's shell configuration or executable scripts. On next login or script execution, the attacker achieves code execution in the victim's context, potentially escalating to full system compromise. Proof-of-concept code is publicly available demonstrating the attack technique with /tmp file creation.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Apr 16, 2026

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.

Earlier versions of this analysis (1)
v1 Apr 06, 2026 - 23:31 CVSS 8.1

Arbitrary file write via Zip Slip in PraisonAI allows remote attackers to overwrite system files and achieve code execution when users install malicious community templates. The vulnerability affects the PraisonAI Python package's template installation feature, which uses unsafe zipfile.extractall() without path traversal validation. A publicly available proof-of-concept demonstrates creating ZIP archives with directory traversal paths (e.g., ../../../../tmp/evil.sh) that escape the intended extraction directory. With CVSS 8.1 (High) and requiring only user interaction (UI:R) but no authentication (PR:N), this poses significant risk to organizations using PraisonAI's community template ecosystem. EPSS data not available, but exploitation is straightforward given the documented PoC.

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.

Affected Packages

pypi praisonai fix: 4.5.113

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/MervinPraison/PraisonAI) PRIMARY 8.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H

Primary rating from Vendor (https://github.com/MervinPraison/PraisonAI) · only source for this CVE.

CVSS VectorVendor: https://github.com/MervinPraison/PraisonAI

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

3
Analysis Updated
Apr 16, 2026 - 01:47 vuln.today
v2 - CVSS changed
Patch released
Apr 07, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 06, 2026 - 23:08 nvd
HIGH 8.1

DescriptionCVE.org

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).

Executive ViewAI

Why It Matters

PraisonAI versions prior to 4.5.113 contain an arbitrary file write vulnerability that allows attackers to overwrite critical system files through malicious template installations, exploitable via social engineering with no special privileges required. This poses a significant risk to organizations using PraisonAI for workflow automation, as successful exploitation could compromise system integrity and availability. The attack requires user interaction but has low observed exploitation activity to date.

Business Impact: High
Compensating Controls

Apply vendor patch to version 4.5.113 or later. Interim mitigations if immediate patching unavailable: (1) Restrict PraisonAI template installation capabilities via configuration or IAM policies, (2) Disable template installation features until patch deployment, (3) Monitor file system write operations from PraisonAI processes for anomalous activity, (4) Implement endpoint detection and response (EDR) alerting on unauthorized system file modifications.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

pkg:pip/praisonai

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy