-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Security] OAuth callback host/URI inconsistency allows authorization code interception (V-01) #96485
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.securitySecurity documentationSecurity documentation
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.securitySecurity documentationSecurity documentation
Type
Fields
Priority
None yet
Summary
OPENCLAW_OAUTH_CALLBACK_HOSTchanges the address the local callback HTTP server listens on, butREDIRECT_URIis hardcoded tohttp://localhost:53692/callbackregardless of that env var.Location
src/llm/utils/oauth/anthropic.ts:49Impact
Severity: Medium
OPENCLAW_OAUTH_CALLBACK_HOSTis set to any non-localhost value, the callback server and theredirect_urisent toclaude.aidisagree, breaking the OAuth flow silently.OPENCLAW_OAUTH_CALLBACK_HOST(e.g. via a compromised.envfile or environment injection), they can redirect the OAuth authorization code to an attacker-controlled host, hijacking the session token.Reproduction
Remediation
OPENCLAW_OAUTH_CALLBACK_HOSTentirely. The OAuth callback should always bind to127.0.0.1— there is no valid use case for a remote callback host in a local-first CLI tool.REDIRECT_URIfromCALLBACK_HOSTand restrict accepted values to loopback addresses (127.0.0.1,::1,localhost) with an explicit allowlist check.Reported via automated codebase security review — github.com/openclaw/openclaw