CVE-2026-40157: PraisonAI vulnerable to arbitrary file write via path traversal in `praisonai recipe unpack`
Affects PraisonAISource GCVE Database
Not known to be exploited · CVSS 9.4 Critical : upgrade to 4.5.128 as a priority.
Data as of 16 Nov 2026, 16:48 UTC
- Patch
- Available – fixed in 4.5.128
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:HExploitation evidence
Disclosed: evidence found.
CVE published 10 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 15 Nov 2026.
What to do
Upgrade PraisonAI to 4.5.128.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIPraisonAI | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in PraisonAI version 4.5.128 that fixes this vulnerability by replacing the unsafe extraction loop in `cmd_unpack` with the existing safe extraction function `_safe_extractall`, which validates archive member paths to prevent path traversal. Users should upgrade to version 4.5.128 or later. Until patched, avoid unpacking untrusted `.praison` bundles with `praisonai recipe unpack`.
Description
PraisonAI contains a critical path traversal vulnerability (CVE-2026-40157) in its recipe unpacking command. The vulnerability arises because the `cmd_unpack` function extracts `.praison` tar archives using Python's `tar.extract()` without validating archive member paths, allowing malicious archives with `../` entries to write files outside the intended directory. This can lead to arbitrary file overwrite on the victim's filesystem. A safe extraction function exists in the codebase but is not used by this command. The vulnerability affects versions >=2.7.2 and <4.5.128 and is fixed in version 4.5.128.
References
- github.com/MervinPraison/PraisonAI/security/advisories/GHSA-99g3-w8gr-x37c (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-40157 (opens in a new tab)
- github.com/MervinPraison/PraisonAI (opens in a new tab)
- github.com/MervinPraison/PraisonAI/releases/tag/v4.5.128 (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/praisonai/PYSEC-2026-469.yaml (opens in a new tab)
- pypi.org/project/praisonai (opens in a new tab)