/

CVE-2026-51867

Severity:

CRITICAL RISK

(9.8)

Broken Access Control (CWE-284) in AgentGPT API Router

CVE-2026-51867

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-284

Impact:

Unauthorized cross-tenant data access or modification

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

AgentGPT contains a critical access-control weakness in an externally reachable agent API route. A caller-selected object or tenant identifier may reach a data-access operation without a verified owner, tenant, workspace, or membership relationship, potentially exposing or modifying data across security boundaries.

Affected context

The issue may occur in AgentGPT deployments using the affected agent router when API requests can supply object or tenant identifiers that are passed into data-access logic. Risk is higher when authorization is not enforced against the authenticated caller's ownership, tenant, workspace, or membership context before the operation executes.

Exploit preconditions

  • Attack surface: Externally reachable agent API route
  • Required access: A caller able to invoke the exposed endpoint; authentication requirements may depend on deployment configuration
  • Trigger point: A request that supplies or influences an object or tenant identifier
  • Why exploitation is possible: The selected identifier can reach a data-access operation without a visible authorization binding to the caller's permitted owner, tenant, workspace, or membership scope

Why this happens

The underlying bug is an authorization design failure in which access decisions are not consistently bound to the authenticated principal and the resource being accessed. The route appears to trust a caller-selected identifier and passes it to data-access logic without enforcing an ownership, tenant, workspace, or membership predicate. This maps to CWE-284: Improper Access Control, because the application may permit operations outside the caller's intended security boundary.

Potential impact

  • Unauthorized disclosure of objects or tenant-scoped data
  • Cross-tenant access or modification
  • Exposure of sensitive agent configuration or activity
  • Data integrity loss or unauthorized deletion
  • Potential account, workspace, or tenant compromise depending on downstream privileges

General mitigation guidance

Mitigation generally focuses on making authorization a mandatory part of every resource access decision rather than relying on caller-supplied identifiers alone.

Common defensive patterns include:

  • Deriving the effective tenant, workspace, and principal from trusted session context
  • Enforcing server-side ownership or membership predicates in the same data-access operation
  • Applying deny-by-default authorization for object and tenant operations
  • Using centralized, consistently enforced authorization policies
  • Avoiding direct trust in client-provided tenant or object identifiers
  • Limiting service and database privileges to the minimum required scope
  • Returning uniform authorization failures without revealing whether unauthorized resources exist

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis and policy checks for routes that pass request identifiers directly into repository or database operations
  • Code review searches for missing ownership, tenant, workspace, or membership predicates
  • Tests that attempt cross-user and cross-tenant access with valid identifiers
  • API authorization matrices covering read, update, delete, and administrative operations
  • Runtime monitoring for repeated access attempts involving identifiers outside a caller's normal scope
  • Automated security review tools that flag externally reachable handlers lacking explicit authorization checks

Sources

SourceLink
gist.github.comgist.github.com/Ro1ME/62547f81c244f273b66755dad63a8673

Frequently asked

questions

It may be remotely exploitable when the affected API route is externally reachable and the caller can influence the object or tenant identifier used by the data-access operation.

Authentication requirements depend on the deployment and route configuration. Even when authentication is required, authorization may still fail if the request is not bound to the caller's permitted owner, tenant, workspace, or membership scope.

Enforce authorization server-side for every resource operation, using trusted identity and tenant context together with an ownership or membership predicate in the access decision.

Use centralized deny-by-default authorization, avoid trusting client-selected scope identifiers, apply least privilege, and include cross-tenant negative tests in API and database access reviews.

Find out what's already
exploitable in your codebase.