Credential Access
High
- Category
- Privilege Escalation
- Content
- 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.
- Confidence
- 97% confidence
- Finding
- The skill explicitly documents that refresh and access tokens are stored as plaintext JSON on disk. Even with 0700/0600 permissions, plaintext bearer tokens are highly sensitive credentials: malware, local privilege abuse, backups, sync tools, or accidental exposure of the auth directory could allow an attacker to replay the tokens and access the user's Microsoft 365 data without re-authentication.
