T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:60- Finding
Full-Scope API Key Violates Least-Privilege Requirements
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 60
Vulnerability Type: Excessive API privileges
Risk Level: HighVulnerable Code
markdown ## Setup 1. Sign up at [joinheader.com](https://joinheader.com) 2. Create an API key (scope: **full**) at Dashboard > API Keys 3. Set `HEADER_API_KEY` in your environment (e.g. `.env` file, shell profile, or agent config)Technical Analysis
The Skill requires a full-scope API key even though common workflows—such as listing topics, reading briefings, browsing source entries, and checking subscriptions—are read-only. The same credential is also used for operations that delete resources, publish briefings, modify subscriptions, access billing functions, and change account configuration.
Requiring the broadest available scope by default violates the principle of least privilege. If the API key is exposed through environment inspection, configuration leakage, agent logs, shell tracing, or another compromised process, the exposed credential may grant substantially more access than the user intended for a read-only briefing request.
The Skill includes confirmation requirements for destructive actions, but those are agent-level instructions rather than API-enforced access controls. An attacker possessing the full-scope credential would not be constrained by those instructions.
Attack Path
- A user follows the setup instructions and creates a full-scope Header API key.
- The key is stored in an environment variable,
.envfile, shell profile, or agent configuration. - An attacker or compromised local process obtains
HEADER_API_KEYthrough configuration disclosure, environment access, execution logs, or another local compromise. - The attacker sends authenticated requests directly to the Header API.
- Because the key has full scope, the attacker can perform mutating operations rather than being limited to reading briefings.
- Depending o ...[truncated 801 chars]
- Remediation
View remediation
Remediation Suggestions
- Default to a read-only API key for listing topics, retrieving briefings, browsing entries, and inspecting account state.
- Define granular scopes for distinct operations, such as:
topics:readbriefings:readsources:writesubscriptions:writesharing:writebilling:manageresources:delete
- Request an elevated credential only when the user explicitly invokes a workflow that requires mutation.
- Use short-lived or task-specific tokens where supported.
- Require fresh user confirmation before using delete, public-sharing, billing, or credential-management scopes.
- Store credentials in a secrets manager or protected agent secret store rather than shell profiles or plaintext
.envfiles. - Ensure credentials are redacted from command output, error messages, traces, and agent transcripts.
- Document key rotation and revocation procedures and recommend periodic rotation.
