T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:192- Finding
Credential-Related Environment Variable Enumeration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 192–194
Vulnerability Type: Unnecessary inspection and potential disclosure of credential-related environment variables
Risk Level: MediumVulnerable Code:
bash # Verify whether environment variables are set echo "Configuration check:" env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/" # Linux/macOS # Or PowerShell # Get-ChildItem Env: | Where-Object {$_.Name -match "API|KEY|TOKEN"} | Format-TableTechnical Analysis
The skill instructs an AI Agent to enumerate environment variables whose names contain credential-related terms such as
API,KEY,TOKEN, andSECRET. This broad inspection is not required for the stated presentation creation and editing functionality and violates the principle of least privilege.The Linux/macOS command masks values before displaying them, but it still discloses the names and existence of sensitive variables. Those names may reveal deployed services, authentication mechanisms, or operational configuration.
The suggested PowerShell alternative is more severe:
Get-ChildItem Env:returns environment-variable entries containing both names and values, andFormat-Tablemay display plaintext credential values. If an Agent executes the documented alternative, secrets could be included in terminal output, Agent context, execution logs, or conversation history.No external transmission mechanism was identified. The exposure is limited to environment variables accessible to the Agent's current process and user account; the instruction does not elevate operating-system privileges.
Attack Path
- A user or Agent loads the skill and follows its environment-validation instructions.
- The Agent executes the command appropriate to the host operating system.
- The command searches the entire current-process environment for broadly named credential variables.
- On Linux or macOS, sensitive vari ...[truncated 947 chars]
- Remediation
View remediation
Remediation Suggestions
-
Remove all broad environment enumeration based on generic terms such as
KEY,TOKEN, andSECRET. -
Define the exact environment-variable name required by the skill, if any.
-
Validate only whether that specific variable exists, without printing its value. For example:
bash if [ -n "${EXPECTED_API_KEY:-}" ]; then echo "EXPECTED_API_KEY is configured" else echo "EXPECTED_API_KEY is not configured" fi -
For PowerShell, use a presence-only check that cannot render the value:
powershell if (Test-Path Env:EXPECTED_API_KEY) { Write-Output "EXPECTED_API_KEY is configured" } else { Write-Output "EXPECTED_API_KEY is not configured" } -
Prevent secrets from being written to Agent responses, terminal logs, command histories, telemetry, or execution logs.
-
Run the Agent with a minimal environment containing only variables required for the presentation task.
-
Document every credential the skill genuinely requires and explain why access is necessary.
-
