Skip to content
HighVulnerabilityLLM-specific

GHSA-hvhp-v2gc-268q: PraisonAI has an Arbitrary File Write in Python API

Published
Record updated
View JSON
Affected
  • PraisonAI <= 4.6.39
Fixed in
4.6.40
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%

Summary

PraisonAI versions up to and including 4.6.37 skip path validation in `write_file` (`code/tools/write_file.py:77-83`) when `workspace=None`. Hidden metadata on a crawled webpage can then cause an agent to call `write_file` autonomously and write attacker-chosen content to an arbitrary path.

Mitigation

Fix: if `workspace` is None, set it to `os.getcwd()` and reject paths outside it with `{'success': False, 'error': 'Path outside workspace'}` (using `is_path_within_directory`).