Severity:

HIGH RISK

(8.8)

Authentication Bypass in Crabbox Shared-Token Flows

CVE-2026-8621

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized Access to Tenant-Scoped Resources

Severity:

HIGH RISK

(8.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

Crabbox prior to v0.12.0 contains an authentication bypass where non-admin callers using a shared token can impersonate other owners or organizations by spoofing trusted identity headers.

By injecting malicious X-Crabbox-Owner and X-Crabbox-Org headers, an attacker can trick the service into treating their requests as if they belonged to a victim account and access owner or organization-scoped lease operations.

Affected context

This vulnerability appears in Crabbox deployments that:

  • Use shared tokens for authenticating API requests
  • Rely on caller-provided HTTP headers (such as X-Crabbox-Owner and X-Crabbox-Org) for establishing tenant identity
  • Do not sufficiently bind those headers to the authenticated principal or re-validate them server-side

In such environments, the application treats header values as authoritative for determining which owner or organization a request is acting on, allowing identity spoofing under certain conditions.

Exploit preconditions

  • Attack surface: Crabbox HTTP API endpoints that support shared-token authentication and owner/org-scoped lease operations.
  • Required access: Possession of a valid (non-admin) shared token and the ability to send crafted HTTP requests to the Crabbox service.
  • Trigger point: Submission of a request where the attacker sets X-Crabbox-Owner and/or X-Crabbox-Org to identifiers belonging to a victim owner or organization.
  • Why exploitation is possible: The authorization layer trusts identity information supplied via headers without cryptographic binding to the authenticated token or independent lookup, allowing the caller to arbitrarily claim another tenant's identity.

Why this happens

The core issue is an authentication and authorization mismatch where the system authenticates a request via a shared token but derives tenant identity from untrusted, caller-controlled headers.

This fits CWE-287: Improper Authentication because the application effectively allows the client to self-assert which owner or organization they represent without robust verification that this identity is legitimately associated with the presented shared token. Instead of deriving identity from server-side state tied to the token, the implementation treats X-Crabbox-Owner and X-Crabbox-Org as authoritative, creating a confused deputy scenario where a non-privileged principal can act with another tenant's scope.

Potential impact

  • An attacker may access owner- or organization-scoped lease operations belonging to other accounts.
  • An attacker may read, modify, or delete leases associated with victim owners or organizations.
  • An attacker could disrupt other tenants' workflows by hijacking or expiring their leases.
  • An attacker may gain indirect insight into tenant activity patterns or resource usage.

General mitigation guidance

Effective mitigation generally focuses on binding identity to authentication artifacts and eliminating trust in caller-asserted identity headers:

  • Derive the effective owner/organization context from server-side state associated with the shared token rather than from client-provided headers.
  • If multi-tenant scoping is required per request, maintain a mapping of allowed owner/org identifiers for each token and validate requested scopes against this mapping.
  • Treat identity and tenancy headers as internal-only; strip or overwrite them at the edge so that external clients cannot control them directly.
  • Apply least-privilege principles for shared tokens, ensuring they are scoped narrowly to specific owners/orgs and operations.
  • Document and enforce a clear separation between authentication (who is the caller) and tenancy selection (which resources they may act upon).

How teams detect issues like this

Detection typically involves both code-level and operational approaches:

  • Static analysis & code review:
  • Flag patterns where identity or tenant context is taken directly from HTTP headers or query parameters without verification against the authenticated principal.
  • Review controller/middleware logic for any use of X-Crabbox-Owner, X-Crabbox-Org, or similar headers in authorization decisions.
  • Enforce architectural rules (e.g., "only authentication middleware may set tenant context; application handlers must not trust client headers for identity").
  • Automated policy enforcement:
  • Add CI checks or custom linters to prevent direct use of client-supplied identity headers in authorization logic.
  • Use API gateways or service meshes to normalize or strip sensitive identity headers on ingress.
  • Runtime monitoring:
  • Log effective owner/org context alongside the authenticated token identity and look for anomalies, such as a single token accessing many distinct owners/orgs.

Sources

SourceLink
github.comgithub.com/openclaw/crabbox/commit/b657323f1d1c954cefc8444571fa6c45a8896e7f
github.comgithub.com/openclaw/crabbox/pull/70
github.comgithub.com/openclaw/crabbox/releases/tag/v0.12.0
vulncheck.comvulncheck.com/advisories/crabbox-authentication-bypass-via-header-spoofing

Frequently asked

questions

Yes. Any external caller with network access to the Crabbox API and a valid shared token can potentially exploit the issue by crafting requests with spoofed identity headers.

No. The description indicates that even non-admin shared-token callers can abuse this flaw, as long as they can control the X-Crabbox-Owner and X-Crabbox-Org headers in their requests.

Ensure that tenant and identity information is derived exclusively from trusted server-side sources, such as data bound to the authenticated token or session, and ignore or sanitize any client-supplied identity headers that influence authorization.

Adopt a consistent security architecture where:

  • Authentication establishes a principal, and
  • Authorization derives resource scope from server-maintained mappings,

while enforcing coding guidelines that prohibit trusting client-controlled headers for identity or tenant selection. Periodic security reviews of authentication and multi-tenant logic can also help catch such patterns early.

Find out what's already
exploitable in your codebase.