/

CVE-2026-56225

Severity:

HIGH RISK

(8.3)

Authorization Bypass (CWE-269) in Capgo API Key Scope

CVE-2026-56225

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-269

Impact:

Privilege Escalation and Credential Tampering

Severity:

HIGH RISK

(8.3)

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

Capgo contains an authorization bypass in its public API key management handlers, allowing app-scoped keys to act outside their declared application scope.

When keys created with mode=all and limited_to_apps are not correctly enforced, a scoped key can enumerate, update, or delete sibling API keys for the same account, exposing account-level credential tampering risks.

Affected context

The vulnerability appears in Capgo deployments that rely on scoped public API keys for access control to key management endpoints (get/put/delete/post).

It is relevant when keys are created with mode=all and constrained via limited_to_apps, but authorization checks only evaluate limited_to_orgs and ignore the app-specific scope.

In such configurations, app-scoped keys may inadvertently gain broader control over API keys under the same account.

Exploit preconditions

  • Attack surface: Public API key management endpoints (get, put, delete, post).
  • Required access: Possession of an API key created with mode=all and restricted using limited_to_apps.
  • Trigger point: Invoking key management handlers where authorization checks validate limited_to_orgs but omit limited_to_apps.
  • Why exploitation is possible: The authorization model fails to enforce application-level scoping, so app-scoped keys are treated as if they have account-level privileges over sibling keys.

Why this happens

The underlying issue is an incomplete authorization check, mapped to CWE-269: Improper Privilege Management.

The system models fine-grained scopes using attributes such as limited_to_apps and limited_to_orgs, but the enforcement logic in key management handlers only evaluates organization-level constraints.

Because application-level restrictions are not consulted, app-scoped credentials effectively inherit broader capabilities than intended, breaking the principle of least privilege and allowing horizontal privilege escalation within the same account.

Potential impact

  • An app-scoped API key may enumerate sibling API keys under the same account.
  • Attackers could update or rotate other API keys, potentially disrupting legitimate integrations.
  • Malicious deletion of keys can cause service outages or denial of access for other applications.
  • Unauthorized creation of broadly scoped keys could escalate privileges to effective account-level control.

General mitigation guidance

Mitigation typically focuses on tightening privilege management and ensuring scope-aware authorization for all credential operations.

Useful defensive patterns include:

  • Enforcing both organization-level and application-level constraints in all key management paths, with explicit checks for limited_to_apps when keys claim app-specific scope.
  • Modeling permissions in a central authorization layer so that business rules for scope evaluation are not duplicated or inconsistently applied across handlers.
  • Designing API keys with least-privilege defaults, avoiding broad mode=all capabilities unless strictly necessary.
  • Applying defense-in-depth controls by logging and monitoring key-management actions, and limiting who or what can call administrative endpoints.

How teams detect issues like this

Detection strategies often rely on reviewing authorization logic and monitoring key management behavior:

  • Static analysis or manual code review to confirm that all scope attributes (e.g., app-level, org-level, role-level) are consistently enforced across create, read, update, and delete operations.
  • Policy-based checks in CI to flag handlers that bypass central authorization routines or perform ad hoc privilege checks.
  • Runtime monitoring of API key management endpoints for anomalies, such as app-scoped keys performing account-level operations.
  • Automated security testing or fuzzing focused on role and scope combinations to identify cases where constraints are not applied.

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-hwc7-j2p6-43xp
vulncheck.comvulncheck.com/advisories/capgo-authorization-bypass-in-api-key-management-via-app-limited-keys

Frequently asked

questions

No. Exploitation requires possession of an app-scoped API key with mode=all. However, once such a key is available, it can be misused to operate on sibling keys within the same account due to missing scope enforcement.

The attacker needs access to a valid API key that is intended to be limited to a specific application but still has access to the key management endpoints. With this, they can call get/put/delete/post handlers and abuse the flawed authorization logic.

The safest approach is to centralize authorization decisions and consistently enforce all relevant scope attributes (organization, application, role) for every sensitive operation. Each key-management action should validate that the caller's scope exactly matches the resource being manipulated.

Prevention involves designing a clear privilege model, implementing least-privilege defaults, and routing all access checks through a well-tested authorization layer. Regular security reviews, automated tests for scope handling, and monitoring of administrative endpoints help catch regressions before deployment.

Find out what's already
exploitable in your codebase.