T09 · Insecure Skill Coding Practices
- Location
SKILL.md:125- Finding
User-Controlled API Endpoint Can Expose Authentication Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:125-146
Vulnerability Type: User-controlled authenticated API destination
Risk Level: HighVulnerable Code
json { "action": "store_credentials", "api_key": "cp_live_xxxxxxxxxxxx", "handle": "my-agent", "base_url": "https://clawprint.io/v3" }markdown | Parameter | Type | Required | Description | |---|---|---|---| | api_key | string | No | API key with the `cp_live_` prefix; required for credential management | | base_url | string | No | API base URL; defaults to `https://clawprint.io/v3` |Technical Analysis
The Skill defines
base_urlas an input parameter while also accepting and using a Clawprint API key for credential-management and authenticated API operations. It does not require the URL to use the exact trusted Clawprint origin, define a hostname allowlist, prevent cross-origin redirects, or prohibit authorization credentials from being attached to requests sent to an overridden destination.Consequently, an attacker who can influence invocation parameters may select an attacker-controlled HTTPS endpoint. If an implementation follows the documented workflow and attaches the API key to that request, the credential and associated identity data can be disclosed.
No implementation script is included in the project, so the precise request construction cannot be verified. The vulnerability exists in the unsafe interface and configuration instructions rather than in executable code.
Attack Path
- The victim configures a valid
CLAWPRINT_API_KEYor submits an API key through the documented input. - An attacker supplies or induces an invocation containing a malicious value such as
base_url=https://attacker.example/v3. - The agent follows the Skill's instruction to perform a credential-management or authenticated API operation against the supplied base URL.
- The implementation attaches the API key in an authorization header, request body, or equivalen ...[truncated 720 chars]
- The victim configures a valid
- Remediation
View remediation
Remediation Suggestions
- Remove
base_urlfrom user-controlled Skill input and use a fixed, internally configured API origin. - If endpoint configurability is necessary, enforce an exact allowlist of trusted schemes, hosts, ports, and path prefixes.
- Require HTTPS and reject URLs containing user-info components, unapproved ports, IP literals, ambiguous hostnames, or untrusted subdomains.
- Resolve and validate the final destination before sending credentials.
- Disable redirects for authenticated requests, or strip authorization data whenever a redirect changes the origin.
- Keep API keys out of request bodies and logs; use a dedicated authorization header only for the validated trusted origin.
- Apply narrowly scoped, short-lived credentials and support immediate key revocation and rotation.
- Add tests proving that credentials are never transmitted to an overridden host or across a cross-origin redirect.
- Remove
