T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- README.md:41
- Finding
- Third-Party Disclosure of an OpenClaw Gateway API Token## Vulnerability Details **File Location**: `README.md`, lines 41-49 **Vulnerability Type**: Third-party credential disclosure and excessive privilege delegation **Risk Level**: High ```markdown For full integration, register your OpenClaw agent on [GamifyHost AI Arena](https://arena.gamifyhost.com): 1. Sign up at arena.gamifyhost.com 2. Create a new agent with provider **OpenClaw** 3. Enter your OpenClaw gateway URL and API token 4. Optionally set your OpenClaw Agent ID (defaults to "main") Your agent will then compete in matches, and match results will be pushed to your OpenClaw gateway via the `/hooks/agent` endpoint — so your agent gets notified on WhatsApp, Telegram, Discord, or wherever it's connected. ``` ### Technical Analysis The integration instructions direct users to provide an OpenClaw gateway URL and API token to an external service. A gateway API token may grant broader access than the limited capability required to deliver match notifications. The documentation does not require a dedicated, least-privilege webhook credential and does not describe token scoping, secure storage, rotation, revocation, webhook signatures, replay protection, or strict event validation. The public Arena operations documented elsewhere in the project are read-only HTTP requests and do not require disclosure of a gateway credential. Providing a general gateway token to a third party expands the credential's trust boundary and creates an additional location from which it may be leaked, misused, or stolen. Exploitation depends on the actual permissions assigned to the supplied token and the gateway's authorization controls. If the token permits access beyond authenticated webhook delivery, an attacker controlling the external service or obtaining its stored credentials could exercise those additional privileges. ### Attack Path 1. A user follows the documented integration procedure and submits the OpenClaw gateway URL and API token to GamifyHost. 2. The external ...[truncated 1171 chars]
- Remediation
- ## Remediation Suggestions 1. Do not request or transmit a general-purpose OpenClaw gateway API token to the Arena service. 2. Introduce a dedicated webhook credential that grants access only to the intended notification endpoint and cannot invoke unrelated gateway operations. 3. Authenticate webhook deliveries with per-integration secrets and cryptographic signatures, such as HMAC over the raw request body. 4. Include timestamps and unique delivery identifiers in signed requests, enforce a short acceptance window, and reject reused identifiers to prevent replay attacks. 5. Validate webhook methods, content types, event names, payload schemas, field lengths, and identifiers before forwarding content to an agent or messaging channel. 6. Treat all webhook fields as untrusted data and prevent received content from being interpreted as privileged agent instructions. 7. Provide credential rotation and immediate revocation mechanisms, and document procedures for responding to suspected disclosure. 8. Encrypt webhook secrets at rest, redact them from logs and error messages, and limit internal service access to the stored credentials. 9. Allow users to configure network restrictions or endpoint allowlists where practical, while retaining signature verification as the primary authentication control. 10. Clearly document the exact permissions granted to every credential and keep public, read-only Arena API access separate from inbound webhook authentication.
