T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:54- Finding
Overbroad Gmail Scanning May Access Unrelated Sensitive Messages
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 54–58; recurring execution is specified at line 91
Vulnerability Type: Excessive mailbox access beyond least privilege
Risk Level: MediumVulnerable Code Snippet
md ### Step 1 — Gmail scan Scan for bill emails: "bill", "invoice", "statement", "direct debit", "standing order". Extract current amounts and providers.The scan is configured to recur daily:
md ### When a new bill arrives (Gmail scan, daily)Technical Analysis
The skill directs the agent to scan Gmail using broad, generic terms such as
invoice,statement, anddirect debit. These terms may occur in banking, healthcare, business, tax, legal, or other confidential correspondence unrelated to household utility monitoring.The instructions do not require:
- A dedicated mailbox label or folder.
- A provider or sender allowlist.
- User approval before opening each matching message.
- Restrictions on which message fields or attachments may be processed.
- A mechanism for excluding unrelated financial correspondence.
- Defined retention and deletion controls for extracted information.
Consequently, an agent with Gmail access may process more mailbox content than is necessary for the declared bill-monitoring purpose. Daily execution increases the frequency and duration of this exposure.
Although the skill includes prompt-injection defenses and private-channel delivery rules, those controls do not prevent unrelated messages from being accessed during the initial search and extraction process.
Attack Path
- The user enables the skill and grants it access to a Gmail integration.
- The agent performs a mailbox search using broad terms such as
statementorinvoice. - An unrelated confidential message, such as a bank statement, medical invoice, or business invoice, matches one of those terms.
- The agent opens or processes the matched message and extracts amounts and provider information.
- The ...[truncated 1156 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user authorization before the first mailbox scan and clearly describe the search scope.
- Restrict monitoring to a dedicated Gmail label or folder, such as
Bill Monitor. - Require users to approve specific provider domains or sender addresses before automatic processing.
- Replace generic mailbox-wide searches with constrained queries combining approved senders, labels, and expected bill terminology.
- Present newly discovered senders to the user for confirmation before opening messages or extracting data.
- Extract only the minimum required fields, such as provider, billing period, amount, and contract end date.
- Do not open or process attachments unless the user explicitly enables attachment parsing for an approved sender.
- Add exclusion rules for banking, healthcare, tax, legal, and business correspondence that is outside the skill's purpose.
- Define retention controls that allow users to inspect, correct, export, and delete extracted bill records.
- Log which approved message produced each bill record without copying unnecessary email content into local storage.
- Apply the same sender and label restrictions to the daily recurring scan.
