T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:114- Finding
Excessive Microsoft Graph Mailbox Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 114-119
Vulnerability Type: Excessive permissions and violation of least privilege
Risk Level: MediumVulnerable Code
yaml microsoft_graph_scopes: - "https://graph.microsoft.com/Mail.Read" - "https://graph.microsoft.com/Mail.Send" - "https://graph.microsoft.com/Mail.ReadWrite"Technical Analysis
The documented Microsoft Graph configuration requests
Mail.ReadWritetogether withMail.ReadandMail.Send.Mail.ReadWriteauthorizes mailbox modifications even though the setup guidance recommends read-only access and the primary classification workflow only requires reading messages.Granting read, write, and send capabilities to one automated Agent unnecessarily expands the trust boundary. If the Agent misclassifies a request, processes adversarial email content, or invokes an unsafe workflow, it could modify mailbox contents and communicate externally using the configured account.
Attack Path
- An operator authorizes the Skill with the documented Microsoft Graph scopes.
- An attacker sends a crafted email designed to match a supported processing workflow.
- The Agent reads and interprets the attacker-controlled message.
- The message influences an automated action or triggers erroneous processing.
- Because the Agent has
Mail.ReadWriteandMail.Send, the resulting action can modify mailbox data or send a message as the configured user.
Impact Assessment
A compromised or incorrectly directed workflow could:
- Read sensitive business and financial correspondence.
- Mark, move, or otherwise modify messages.
- Potentially remove messages where the granted API operations permit it.
- Send email using the configured mailbox identity.
- Conceal or disrupt accounting and compliance communications.
- Expose payment, client, invoice, or government-notification information.
The affected scope is the mailbox and operations covered by the OAuth grant. Th ...[truncated 96 chars]
- Remediation
View remediation
Remediation Suggestions
- Use
Mail.Readas the default scope for monitoring and classification. - Remove
Mail.ReadWriteunless a specific, documented feature cannot function without it. - Request
Mail.Sendonly when outbound email is explicitly enabled. - Separate read-only processing from privileged mailbox modification and sending.
- Require separate, informed consent before enabling each privileged operation.
- Prefer delegated permissions scoped to a dedicated service mailbox rather than broad application permissions.
- Add server-side policy restrictions governing permitted recipients, folders, and message operations.
- Record all mailbox mutations and outbound messages in an immutable audit log.
- Require human approval for message deletion, movement, forwarding, and sending.
- Periodically review and revoke unused OAuth grants.
- Use
