highCVSS 7.5Vulnerability

GHSA-2rcg-mm5h-xchx

## Summary The MentionsParser in `src/praisonai-agents/praisonaiagents/tools/mentions.py` processes `@file:` mentions in agent prompts by reading arbitrary files from the filesystem. When a file path is not found relative to the workspace, the parser falls back to using the path as an absolute path without any validation or boundary check. This allows an attacker who can influence agent prompts (via chat messages, Telegram/Discord/Slack bot inputs, or YAML workflow configs) to read any file on the filesystem accessible to the process user. ## Details **Vulnerable code (lines 165–178):** ```python def _process_file_mention(self, file_path: str) -> Optional[str]: """Process @file:path mention.""" try: # Resolve path relative to workspace full_path = self.workspace_path / file_path if not full_path.exists(): # Try as absolute path full_path = Path(file_path) if not full_path.exists(): self._log(f"File not found: {file_path}", logging.WARNING) return f"# File: {file_path}\n[File not found]" content = full_path.read_text(encoding="utf-8") ``` **The vulnerability is in the fallback at line 171–172:** When the file is not found relative to `workspace_path`, the code constructs `full_path = Path(file_path)`, which accepts any absolute or relative path without validation. There is no: - `..` path traversal check - Workspace boundary validation - Symlink resolution against workspace - Protected path guard The `file_path` parameter originates from parsing `@file:` mentions in user/LLM prompts. The `MentionsParser` is used across the framework to process mentions in agent instructions and user messages. **Contrast with `skill_tools.py` `read_skill_file`** (lines 140–193), which properly validates: ```python # skill_tools.py line 179 — proper validation if os.path.commonpath([full_path, skill_path]) != skill_path: return f"Error: Path traversal detected - {f

Properties

ghsa_id
GHSA-2rcg-mm5h-xchx
summary
PraisonAI: Arbitrary File Read via `@file:` Mention Path Traversal
severity
high
cvss_score
7.5
cve_id
GHSA-2rcg-mm5h-xchx
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
is_ghsa_only
true
ghsa_published
2026-06-18T13:57:00Z
source_url
https://github.com/advisories/GHSA-2rcg-mm5h-xchx
ghsa_updated
2026-06-18T13:57:01Z

Related Entities (4)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]pip/praisonaiagents

AFFECTS (1)

[Software]pip/praisonaiagents

HAS_WEAKNESS (1)

[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Explore deeper with Ninja Signal's threat intelligence graph