T05 · Unauthorized Access and Privilege Escalation
- Location
README.md:136- Finding
Excessive WHOOP OAuth scopes violate least privilege
- Content
View full analysis
Vulnerability Details
File Location:
README.md:136-142
Vulnerability Type: Excessive OAuth permissions
Risk Level: MediumVulnerable Code
text 1. Go to [developer.whoop.com](https://developer.whoop.com) and create an account 2. Create a new OAuth application: - **Name:** anything (e.g. "OpenClaw Health") - **Redirect URI:** `http://127.0.0.1:8787/callback` - **Scopes:** enable all `read:*` scopes + `offline` (required for refresh tokens) 3. Copy your **Client ID** and **Client Secret** 4. Store in 1Password (item: `OpenClaw Whoop`, fields: `client_id`, `client_secret`) or export as env varsTechnical Analysis
The setup instructions direct users to grant every available WHOOP
read:*scope. The connector only uses the cycle, recovery, and sleep endpoints inconnectors/whoop/__init__.py:182-226. Consequently, granting all read scopes exceeds the permissions required to generate the declared daily health brief.The
offlinescope is reasonably necessary for unattended token refresh. The issue is the unrestricted request for all read scopes rather than an explicit list of scopes corresponding to the implemented API calls.OAuth access and refresh tokens inherit the authorized scope set. A token exposed through local storage, process monitoring, backups, endpoint telemetry, or another application vulnerability could therefore be used to access WHOOP resources unrelated to the Skill's implemented features.
Attack Path
- A user follows the README and authorizes all WHOOP
read:*scopes plusoffline. - WHOOP issues an access token and long-lived refresh token carrying those permissions.
- The refresh token is stored in 1Password or
~/.openclaw/secrets/health_tokens.json. - An attacker obtains either token through a separate local compromise, backup disclosure, or process-level access.
- The attacker uses the token against any WHOOP API resource permitted by t ...[truncated 481 chars]
- A user follows the README and authorizes all WHOOP
- Remediation
View remediation
Remediation Suggestions
- Replace
all read:* scopeswith an explicit allowlist containing only the scopes required for:- Cycle retrieval
- Recovery retrieval
- Sleep retrieval
- Offline refresh
- Document why each requested scope is necessary and map it to the corresponding endpoint.
- Avoid requesting optional profile, body, workout, or other read scopes unless a feature requiring them is enabled.
- If provider authorization supports incremental consent, request optional scopes only when the user enables the related feature.
- Advise existing users to revoke and reauthorize the integration with the reduced scope set, because changing documentation alone will not narrow previously issued tokens.
- Add a test or configuration assertion that compares the requested scopes against an approved allowlist.
- Replace
