T05 · Unauthorized Access and Privilege Escalation
- Location
index.ts:207- Finding
Unauthenticated Health Endpoint Discloses the Active Pairing Secret
- Content
View full analysis
handleHealth(res), }); ``` ### Technical Analysis The active link code is the only credential required by `/nimo/pair` to obtain a session token. However, `/nimo/health` returns that credential to any caller. The project documentation explicitly states that routes using `auth: "plugin"` do not require Gateway authentication because the plugin manages authentication itself. Consequently, the supposed pairing secret is not secret. Single-use rotation does not correct this weakness because an attacker can request the latest code immediately before pairing. The absence of rate limiting or trusted-client binding further facilitates automated exploitation. This violates least privilege because unauthenticated clients receive the credential needed to acquire authenticated AI access. ### Attack Path 1. An attacker identifies a network-reachable OpenClaw Gateway running the plugin. 2. The attacker sends `GET /nimo/health` without credentials. 3. The response reveals the current `linkCode`. 4. The attacker sends `POST /nimo/pair` with the disclosed code. 5. The plugin returns a valid bearer token with a 24-hour lifetime. 6. The attacker uses that token with `/nimo/chat` and `/nimo/events`. 7. The attacker can invoke the configured AI agent and receive its responses until the token expires or the Gateway restarts. ### Im ...[truncated 441 chars]- Remediation
View remediation
