Quick answers
- Is CVE-2026-47397 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-47397 being exploited in the wild.
- How severe is CVE-2026-47397?
- High severity, with a CVSS score of 4, published 21 July 2026.
- Which products and versions are affected?
- praisonai (PyPI) ECOSYSTEM:introduced=0,fixed=4.6.40.
- Is there a fix for CVE-2026-47397?
- Yes. praisonai (PyPI): upgrade to 4.6.40 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-47397 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-47397?
- Check whether you run praisonai (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- praisonai (PyPI): upgrade to 4.6.40 or later
pip install "praisonai>=4.6.40"
Technical details
A path traversal and arbitrary file write vulnerability exists in PraisonAI's `write_file` tool. The root cause is located in `code/tools/write_file.py`, where path validation is entirely skipped when the `workspace` variable is set to `None` (the default state in production environments). An attacker can exploit this by hosting a webpage with hidden metadata containing specific keys like `output_file` and `output_content`. When a PraisonAI agent crawls and analyzes such a page, the LLM may autonomously invoke the `write_file` tool using the attacker-provided arbitrary path. This allows for writing attacker-controlled content to any location accessible by the process. The issue is fixed in version 4.6.40 by defaulting the workspace to the current working directory and enforcing path containment checks.
Affected products
- MervinPraison (PraisonAI) PraisonAI < 4.6.40
Identifiers
- CVE-2026-47397
- GHSA-hvhp-v2gc-268q
- PYSEC-2026-2916
Timeline
- 2026-05-19: patched: Fix included in security hardening batch PR #1684
- 2026-07-21: disclosed: CVE-2026-47397 published