Back to skill

Security audit

m365-mcp

Security checks for vulnerabilities and agentic risk

Overview

The skill clearly discloses its Microsoft 365 access, account-changing tools, and local token storage, with no evidence of hidden or unrelated behavior.

Private Microsoft 365 content can enter your AI client's context. Enable M365_MCP_READ_ONLY=true during authentication and server startup if you only need reads; otherwise require approval for sending, changing, or deleting data. Protect the plaintext token directory and revoke Microsoft consent if compromised. This review covers the supplied skill document and supporting upstream checks, not certification of the exact npm build installed.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

md
- Set `M365_MCP_READ_ONLY=true` for an enforced least-privilege mode. It requests
  read-only OAuth scopes, omits mutating tools from discovery, and rejects direct
  calls to them.
- Refresh and access tokens are stored as plaintext JSON under
  `~/.m365-mcp/auth/` (or `M365_MCP_AUTH_DIR`), protected with directory mode
  `0700` and file mode `0600` where supported. Protect that directory and revoke
  the app's Microsoft account consent if a token or device is compromised.