T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:16- Finding
Hardcoded Gmail Account May Permit Unauthorized Mailbox Metadata Disclosure
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 16–18
Vulnerability Type: Hardcoded account selection without an explicit authorization check
Risk Level: MediumVulnerable Code
bash gog gmail search "in:inbox" --max 5 --json --results-only --account william.kettle@neuralshift.co.ukTechnical Analysis
The skill directs the agent to query a fixed Gmail account rather than selecting an account based on the invoking user's identity or requiring confirmation before access. It also instructs the agent to return the sender, subject, and date of the five newest inbox messages.
In a shared environment where
gogalready has valid credentials for the hardcoded account, a user who can invoke the skill may cause the agent to access and display mailbox metadata without demonstrating that they are authorized to view that mailbox. The command does not bypass Gmail authentication or acquire additional Gmail permissions; exploitation depends on valid credentials already being available to the agent process.Attack Path
- An administrator or mailbox owner authenticates
gogforwilliam.kettle@neuralshift.co.ukin an environment accessible to the agent. - Another user with access to that agent invokes
/skill gmail_last5. - The agent executes the hardcoded
gog gmail searchcommand using the existing credentials. - Gmail returns the five newest inbox search results.
- The agent exposes message senders, subjects, and dates to the invoking user without a separate authorization check.
Impact Assessment
A successful exploit can disclose private email metadata, including correspondent identities, subject lines, and message timestamps, from the hardcoded mailbox. Subject lines may contain confidential business, personal, security, or account-related information.
The scope is limited to data accessible through the credentials and permissions already configured for
gog. No evidence sh ...[truncated 156 chars]- An administrator or mailbox owner authenticates
- Remediation
View remediation
Remediation Suggestions
- Remove the hardcoded Gmail address from the skill command.
- Resolve the mailbox from the authenticated invoking user's approved account context.
- If multiple accounts are configured, list only authorized account identifiers and require the user to select and explicitly confirm one before querying it.
- Enforce server-side or agent-platform authorization so permission is not based solely on whether
goghas cached credentials. - Isolate Gmail credentials by user and avoid sharing credential stores across unrelated users or sessions.
- Apply least-privilege Gmail scopes and restrict the integration to read-only access when mailbox modification is unnecessary.
- Warn users that email metadata will be displayed, and consider redacting sensitive subject lines in shared channels.
- Record mailbox access in an audit log containing the invoking identity, selected account, time, and operation, while excluding message content and secrets.
- On command failure, do not reveal configured account identities to unauthorized users; direct them to an administrator or a secure account-selection workflow.
