T09 · Insecure Skill Coding Practices
- Location
SKILL.md:13- Finding
Configurable API Endpoint Can Expose a High-Privilege Bearer Token
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:11-27, with related disclosures atSKILL.md:331-340
Vulnerability Type: Unrestricted credential destination and missing transport enforcement
Risk Level: HighVulnerable Code
markdown metadata: author: Membrane Inc version: "1.0.0" homepage: https://getmembrane.com openclaw: requires: env: - MEMBRANE_TOKEN - MEMBRANE_API_URL primaryEnv: MEMBRANE_TOKEN homepage: https://getmembrane.com --- # Self-Integration Connect to any external app and perform actions on it. Uses the [Membrane](https://getmembrane.com) API. ## Making API Requests All requests go to `${MEMBRANE_API_URL:-https://api.getmembrane.com}` with a Bearer token:Authorization: Bearer $MEMBRANE_TOKEN Content-Type: application/json
text The documented data flow confirms that sensitive information is sent to the configurable destination:
markdown | Endpoint | Data Sent | |---|---| | `${MEMBRANE_API_URL:-https://api.getmembrane.com}/*` | API token, connection parameters, action inputs, agent prompts | ## Security & Privacy - All data is sent to the Membrane API over HTTPS. - `MEMBRANE_TOKEN` is a high-privilege credential that can create connections and run actions across external apps. Treat it as a secret.Technical Analysis
The skill instructs the agent to construct every API destination from the environment-controlled
MEMBRANE_API_URLvalue and attachMEMBRANE_TOKENas a bearer credential. It does not require the configured URL to use HTTPS, validate that its hostname belongs to Membrane, or define an allowlist of trusted origins.As a result, anyone able to influence the skill's environment can redirect authenticated requests to an arbitrary endpoint, including an attacker-controlled HTTPS server or a plaintext HTTP endpoint. The attacker-controlled server would receive the ` ...[truncated 2335 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
MEMBRANE_API_URLconfigurability when custom deployments are not an explicit requirement. Use a fixed, trusted API origin such ashttps://api.getmembrane.com. - If endpoint overrides are required, validate the URL before sending any request:
- Require the
httpsscheme. - Require an exact hostname from an explicit allowlist.
- Reject embedded user information, unexpected ports, IP-literal hosts, and ambiguous hostnames.
- Normalize the URL before applying validation.
- Require the
- Disable automatic redirects for authenticated requests, or strip the
Authorizationheader whenever a redirect changes the origin. Reject redirects to non-HTTPS destinations. - Apply certificate and hostname verification using a maintained TLS implementation. Do not permit insecure certificate-verification overrides.
- Scope
MEMBRANE_TOKENto the minimum required connections and operations. Use short-lived credentials and provide token rotation and immediate revocation procedures. - Avoid logging authorization headers, connection parameters, prompts, action inputs, or action outputs. Redact secrets from diagnostic messages.
- Update the security documentation so the HTTPS claim reflects enforced behavior rather than only the default configuration.
- Add tests that reject malicious endpoint values, including
http://URLs, untrusted domains, credential-bearing URLs, deceptive subdomains, and cross-origin redirects.
- Remove
