pypi package report

Is aegra-api safe?

1 known vulnerability, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      No published models are known to use this package.


      cvss
      8.6
      high

      CVSS v4.0 base score out of 10

      epss
      0.29%
      low

      chance of exploitation in 30 days, 21st percentile of all CVEs

      xyz score
      3.3
      low

      CyberXYZ composite out of 10

      fig. 01 — GHSA-m98r-6667-4wq7, the advisory selected below

      // 1 advisories

      GHSA-m98r-6667-4wq7

      HIGHGitHub ratingCVE-2026-44504
      // impact

      Aegra deployments running 0.9.0 through 0.9.6 with multiple authenticated users on a shared instance are vulnerable to a cross-tenant IDOR. Any authenticated user (User A), given another user's thread_id (User B), can:

      • Execute graph runs against User B's thread via POST /threads/{thread_id}/runs, POST /threads/{thread_id}/runs/stream, or POST /threads/{thread_id}/runs/wait
      • Read User B's full checkpoint state via the resulting run's output field
      • Inject arbitrary messages into User B's conversation history (persisted in B's checkpoint)
      • Hide their activity from User B's GET /threads/{thread_id}/runs listing because the run carries A's user_id

      The streaming variant is worse — the first SSE event: values frame returns the entire prior messages array immediately on connection, no graph execution needed.

      Thread IDs are UUIDs but leak through frontend URLs, server logs, observability traces, and shared links. Guessing is not required.

      // patches

      Fixed in 0.9.7. The three affected endpoints now perform an SQL-level user_id == authenticated_user.identity check before calling _prepare_run. When the thread exists but is owned by another user, the response is 404 Thread not found (matching the read-side pattern) to avoid leaking thread existence.

      // workarounds

      If upgrade is not immediately possible, register an @auth.on("threads", "create_run") handler that explicitly verifies thread ownership against the authenticated identity before allowing the operation. Without a handler, no built-in authorization runs on these write paths.

      Example mitigation handler:

      from langgraph_sdk import Auth
      
      auth = Auth()
      
      @auth.on("threads", "create_run")
      async def enforce_thread_owner(ctx: Auth.types.AuthContext, value: dict):
          # Look up the thread, raise 404 if not owned by ctx.user.identity.
          # Implementation depends on your data layer.
          ...
      // root cause

      Aegra's authorization model delegates per-resource policy to user-defined @auth.on handlers. When no handler is registered, handle_event(...) returns None and the request proceeds (default-allow). Read endpoints in api/threads.py add a defense-in-depth user_id filter at the SQL layer, but the run-creation endpoints in api/runs.py skipped that filter. Result: out-of-the-box deployments without custom auth handlers were vulnerable.

      // affected endpoints
      • POST /threads/{thread_id}/runs
      • POST /threads/{thread_id}/runs/stream
      • POST /threads/{thread_id}/runs/wait

      Stateless variants (POST /runs, POST /runs/wait, POST /runs/stream) are NOT affected — they generate a fresh thread_id server-side and never accept a caller-supplied one.

      // credits
      • @JoJoTheBizarre — discovered and reported the vulnerability with a precise reproducer (#336)
      • @victorjmarin and @jawhardjebbi — wrote the fix and added test coverage at unit, integration, and manual-auth e2e levels (#337)
      // resources
      // cvss v4.0 vector

      CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

      Attack vector
      Network
      Attack complexity
      Low
      Attack requirements
      None
      Privileges required
      Low
      User interaction
      None
      Confidentiality (vulnerable system)
      High
      Integrity (vulnerable system)
      High
      Availability (vulnerable system)
      None
      Confidentiality (subsequent systems)
      None
      Integrity (subsequent systems)
      None
      Availability (subsequent systems)
      None

      Checked 2026-11-07 at 22:53 UTC. The most recent advisory here was published 2026-05-07. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.