other
- Location
- examples/README.md:58
- Finding
- Mailbox Metadata May Be Disclosed to Third-Party LLM Providers<![CDATA[ ## Vulnerability Details **File Location**: `examples/README.md:58-69` **Vulnerability Type**: Sensitive data disclosure to an external service **Risk Level**: Medium ### Vulnerable Code ```python from llm_integration import EmailCalendarAssistant, format_inbox_for_context # Get formatted context context = format_inbox_for_context(10) # Send to LLM response = llm_client.chat.completions.create( messages=[ {"role": "user", "content": f"Here's my email:\n{context}\nSummarize."} ] ) ``` The data produced by `format_inbox_for_context()` includes mailbox-derived sender names, email subjects, dates, read status, and partial message identifiers. The documented workflow sends this information to an unspecified external LLM provider. ### Technical Analysis Transmitting mailbox metadata to Microsoft Graph is necessary for the declared email-management functionality. Transmitting that data onward to OpenAI, Claude, or another third-party LLM is a separate disclosure boundary and is not required for basic Graph integration. The example does not require explicit user consent immediately before transmission, redact sensitive fields, restrict approved providers, or warn about provider-side logging and retention. Email subjects and correspondent information can reveal confidential business activities, personal relationships, medical information, financial activity, or authentication-related messages. ### Attack Path 1. The user authenticates the Skill with Microsoft Graph. 2. `format_inbox_for_context(10)` retrieves metadata from recent messages. 3. Sender names, subjects, dates, status, and partial IDs are inserted into `context`. 4. The application sends `context` to the configured external LLM API. 5. The external provider can process, log, or retain the mailbox metadata according to its own policies. ### Impact Assessment The issue does not directly expose the OAuth bearer token. It can, however, disclose private mailbox metadata for ...[truncated 179 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Require explicit, informed opt-in before transmitting mailbox or calendar information to an external LLM. - Display the exact fields and number of records that will be sent. - Redact sender addresses, names, subjects, message IDs, attendee addresses, and event details by default. - Permit only explicitly configured and trusted providers. - Document provider retention, training, and data-processing implications. - Offer local-model processing or a mode that sends only user-approved excerpts. - Apply data minimization so only information necessary for the current request is transmitted. ]]>
