T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:7
- Finding
- Overprivileged Access to Unrelated Service Credentials## Vulnerability Details **File Location**: `SKILL.md:7` **Vulnerability Type**: Excessive credential scope and violation of least privilege **Risk Level**: High ### Vulnerable Code ```yaml metadata: {"openclaw":{"requires":{"env":["SHIPPO_API_KEY","FLEXPORT_API_KEY","OPENWEATHER_API_KEY","SLACK_WEBHOOK_URL","SENDGRID_API_KEY","DATABASE_URL"],"bins":["curl","jq"]},"os":["macos","linux","win32"],"files":["SKILL.md"],"emoji":"⚓"}} ``` ### Technical Analysis The skill declares simultaneous access to shipping-provider credentials, a weather-service credential, an outbound Slack webhook, a SendGrid credential, and the database connection string. It also requests `curl`, which can initiate arbitrary HTTP requests. These privileges are broader than necessary for many declared operations. For example, checking a weather forecast does not require database, Shippo, Flexport, Slack, and SendGrid access. Likewise, generating a local supplier report does not inherently require both outbound notification channels. Combining data-access credentials with outbound communication credentials creates a sensitive privilege chain: the same agent context may retrieve confidential shipment or supplier information and transmit it externally. Although Slack and email notifications are declared features, granting all credentials to every invocation exceeds task-specific least privilege. This file contains documentation rather than executable implementation, so the audit found no direct proof that credentials are currently exfiltrated. The vulnerability arises when the hosting platform exposes every declared environment variable to the skill or its agent context. ### Attack Path 1. A user invokes the skill for a narrow task, such as checking weather conditions. 2. The runtime exposes every environment variable listed in `requires.env`, including `DATABASE_URL`, shipping API keys, and outbound messaging credentials. 3. Malicious prompt content, c ...[truncated 1081 chars]
- Remediation
- ## Remediation Suggestions 1. Split the skill into task-specific components, such as weather monitoring, shipment retrieval, database reporting, and stakeholder notification. 2. Inject only the credentials required for the currently authorized operation. 3. Do not make outbound-notification credentials available during read-only monitoring or reporting tasks. 4. Replace general-purpose `curl` access with domain-restricted API tools where the runtime supports them. 5. Apply least-privilege scopes to Shippo, Flexport, SendGrid, and database accounts. 6. Require explicit user confirmation before transmitting supplier, shipment, purchase-order, customer, or financial information. 7. Restrict outbound destinations to approved API hosts and notification recipients. 8. Redact credentials and sensitive fields from tool output, prompts, logs, and error messages. 9. Record auditable logs of credential use and outbound transmissions without recording secret values. 10. Rotate the affected credentials if they have already been exposed to an untrusted agent context.
