T09 · Insecure Skill Coding Practices
- Location
index.js:11- Finding
Unrestricted API Host Override Enables Arbitrary Outbound HTTPS Requests
- Content
View full analysis
{ const options = { hostname: API_BASE, port: 443, path: path, method: 'GET', headers: { 'User-Agent': 'OpenClaw-SUPAH-Skill/1.2.0' } }; https.get(options, (res) => { ``` ### Technical Analysis The `SUPAH_API_BASE` environment variable is passed directly to the `hostname` property of `https.get()` without validation or an allowlist. Although `SKILL.md:10` declares outbound access only to `api.supah.ai`, the implementation can connect to any HTTPS host supplied through the environment. This creates a limited server-side request forgery condition when an attacker can influence the process environment or skill configuration. The attacker can redirect token addresses, wallet addresses, and other requests to an attacker-controlled service or an HTTPS-accessible internal service. The returned JSON is also accepted as legitimate intelligence data, allowing the substituted endpoint to forge token safety scores, trading signals, or portfolio results. ### Attack Path 1. An attacker gains control over the environment or configuration used to launch the skill. 2. The attacker sets `SUPAH_API_BASE` to an attacker-controlled hostname or an internal HTTPS service. 3. A user invokes a token, wallet, safety, signal, or whale-analysis operation. 4. The skill sends the request and associated token or wallet identifier to the substituted host. 5. The attacker records the identifiers or returns fabricated JSON. 6. The skill presents the attacker-controlled response as a successful intelligence result. ### Impact Assessment The issue does not directly grant local ...[truncated 425 chars]- Remediation
View remediation
