T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:172- Finding
Agent Is Instructed to Read a Sensitive API Credential from the Environment
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:172
Vulnerability Type: Credential access beyond the minimum requirements of the Agent
Risk Level: MediumVulnerable Instruction
text Skill side (the form represented by this file): The AI reads the key from the PANGOLINFO_API_KEY environment variable. This is the Skill's default key source; the user configures it in the runtime environment, and the AI reads it directly.The excerpt is an English rendering of the complete security-relevant instruction at line 172.
Technical Analysis
The Skill explicitly directs the AI Agent to read the raw
PANGOLINFO_API_KEYcredential from its runtime environment. This violates least-privilege design because Amazon category and niche analysis only requires authenticated MCP operations; it does not inherently require the language model or Agent context to receive the credential itself.Credentials exposed to an Agent can become available to model context, command traces, tool-call logs, debugging output, telemetry, or later instructions operating within the same session. A prompt-injection payload encountered elsewhere in an Agent workflow could also attempt to make the Agent reveal or misuse any credential it has already accessed.
No evidence was found that this Skill directly transmits or prints the key. The vulnerability is the unnecessary instruction to expose the raw credential to the Agent rather than keeping authentication inside a trusted MCP server or credential broker.
Attack Path
- A user configures
PANGOLINFO_API_KEYin the Agent's runtime environment. - The Skill is loaded for an Amazon category or niche-analysis request.
- Following line 172, the Agent reads the raw environment variable.
- The credential enters an Agent-accessible execution or context boundary.
- A malicious subsequent instruction, compromised tool, verbose trace, or logging mechanism requests or captures the c ...[truncated 870 chars]
- A user configures
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction requiring the AI to read
PANGOLINFO_API_KEY. - Keep the credential exclusively within the MCP server, a credential broker, or an operating-system secret manager.
- Expose only a non-sensitive authentication status to the Agent, such as
authenticated,missing, orexpired. - Ensure MCP tools automatically attach authentication outside the model-visible argument payload.
- Prevent credentials from appearing in prompts, tool arguments, exception messages, traces, and telemetry.
- Redact JWT-shaped values from logs and diagnostic output.
- Use narrowly scoped, short-lived tokens where the service supports them.
- Rotate the credential if it has previously been exposed to model context or retained logs.
- Remove the instruction requiring the AI to read
