T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:12- Finding
Overly Broad Network Tool Permission Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:12
Vulnerability Type: Excessive tool permissions enabling unrestricted outbound network requests
Risk Level: MediumVulnerable code:
yaml compatibility: Requires curl, jq, and internet access. Optional CONTEXT7_API_KEY env var for higher rate limits. metadata: author: context7 version: "1.0" source: https://github.com/upstash/context7 allowed-tools: Bash(curl:*) Bash(jq:*) ReadTechnical Analysis
The Skill requires network access to query two fixed Context7 API endpoints. However,
Bash(curl:*)authorizes arbitrarycurlcommands rather than restricting requests tohttps://context7.com/api/searchandhttps://context7.com/api/context.The bundled scripts use fixed HTTPS endpoints and do not themselves implement malicious exfiltration. Nevertheless, the declared permission exceeds the minimum privilege required by the Skill. If attacker-controlled prompts or untrusted remote documentation influence a tool-capable Agent, the Agent could use the broad permission to contact arbitrary destinations. The simultaneous
Readpermission increases the potential exposure of files accessible to the Agent.Attack Path
- The Skill is loaded, granting unrestricted
curlexecution and file-reading capability. - An attacker supplies a malicious prompt, or attacker-controlled content is returned through a documentation lookup.
- That content instructs or manipulates the Agent into reading session-accessible information or selecting sensitive contextual data.
- The Agent invokes an authorized
curlcommand targeting an attacker-controlled host rather than Context7. - The selected information is transmitted in the request body, URL, or headers.
This path requires the Agent to act on malicious instructions; the broad permission alone does not initiate network activity.
Impact Assessment
Successful exploitation could permit ...[truncated 458 chars]
- The Skill is loaded, granting unrestricted
- Remediation
View remediation
Remediation Suggestions
- Replace unrestricted
Bash(curl:*)access with permission to execute only the two bundled wrapper scripts, if the Skill runtime supports script-level allowlisting. - Otherwise, constrain network access to:
https://context7.com/api/searchhttps://context7.com/api/context
- Prevent callers from overriding the API base URL, destination host, proxy settings, or additional curl options.
- Remove the
Readpermission unless it is demonstrably required for Skill operation; the current lookup workflow only needs its packaged scripts and reference material. - Treat all API responses as untrusted documentation and explicitly prohibit following tool-use instructions contained in returned content.
- Retain the existing warning not to include API keys, passwords, credentials, personal data, or other sensitive information in queries.
- Keep the Context7 API key limited to an authorization header sent only to the fixed HTTPS Context7 origin.
- Replace unrestricted
