T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:12- Finding
Overbroad Access to Unspecified API Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12–13
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: Mediumyaml requires: bins: ["python", "node", "curl", "sqlite3"] env: ["FREE_API_KEYS"]Technical Analysis
The skill requires access to the broadly named
FREE_API_KEYSenvironment variable while also requesting network-capable tools such ascurl. The instructions do not identify a specific API, trusted endpoint, credential scope, or operation that requires these credentials.Providing unspecified API keys to a general-purpose skill violates the principle of least privilege. Because the skill is instructed to search continuously for online tools, APIs, and resources, credential material would be available in a network-enabled context involving potentially untrusted services. The reviewed file does not explicitly instruct the agent to exfiltrate credentials, but its configuration creates unnecessary exposure and allows accidental inclusion of secrets in commands, requests, generated output, or logs.
Attack Path
- A user invokes the skill, causing its declared requirements to be made available.
- The execution environment exposes
FREE_API_KEYSto the skill. - The skill performs broad online resource discovery using network-capable tooling such as
curl. - A generated request, command, diagnostic message, or integration may include a key from the environment without a defined destination allowlist.
- The credential may consequently be disclosed to an unintended remote service, command history, execution log, or user-visible output.
This is an exposure path enabled by excessive credential access; no intentional credential theft or confirmed exfiltration behavior was present in the audited file.
Impact Assessment
Exposure could allow unauthorized use of any API accounts represented by
FREE_API_KEYS, subject to the permissions ...[truncated 456 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the
FREE_API_KEYSenvironment requirement unless credentials are essential to a concrete skill operation. - Request credentials only when the user invokes the specific feature that needs them.
- Replace the aggregated variable with a provider-specific, narrowly scoped credential.
- Restrict each credential to the minimum required permissions, resources, and API operations.
- Apply destination allowlisting so credentials can be sent only to explicitly documented HTTPS endpoints.
- Prohibit printing, logging, interpolating into command lines, or returning credential values in generated output.
- Pass secrets through a dedicated secret manager or protected process input rather than a broadly exposed environment variable.
- Add explicit documentation identifying the credential's provider, purpose, expected scope, and retention behavior.
- Rotate any credentials that may already have been exposed through logs, shell history, or unintended network requests.
- Remove the
