Back to skill

Security audit

Outlook Plus

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Outlook email/calendar integration, but its local credential handling and setup guidance create risks users should review before installing.

Install only if you are comfortable granting this skill read/write/send access to Outlook mail and read/write access to calendars. Avoid printing tokens except for controlled debugging, protect ~/.outlook-mcp, use simple account names, and prefer official package-manager Azure CLI installation instructions rather than the printed curl | sudo bash command.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/outlook-setup.sh:37
Finding
Suggested execution of an unpinned remote installer with root privileges<![CDATA[ ## Vulnerability Details **File Location**: `scripts/outlook-setup.sh`, lines 37-40 **Vulnerability Type**: Remote payload retrieval and privileged execution **Risk Level**: High ### Vulnerable Code ```bash if ! command -v az &> /dev/null; then echo -e "${RED}Error: Azure CLI not installed${NC}" echo "Install with: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash" exit 1 fi ``` ### Technical Analysis When Azure CLI is unavailable, the setup script instructs the user to pipe a remotely retrieved shell script directly into `sudo bash`. The command is printed rather than automatically executed, but it is presented as the prescribed installation procedure during a trusted setup workflow. The effective payload is retrieved from a mutable URL at execution time. It is not pinned to a specific version, downloaded for inspection, or verified using a cryptographic checksum or package signature before receiving root privileges. The use of a Microsoft-controlled HTTPS domain reduces—but does not eliminate—the supply-chain risk. This behavior is not the minimum privilege necessary for the Skill. Azure CLI is a legitimate dependency, but installing it through an unverified network-to-root shell pipeline is not required for Outlook mail or calendar functionality. ### Attack Path 1. A user runs `scripts/outlook-setup.sh` on a system without Azure CLI. 2. The script displays `curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash` as the installation command. 3. The user executes that command while relying on the Skill's setup instructions. 4. `curl` follows the redirect and retrieves the current remote installer. 5. The installer is passed directly to a root shell without local inspection or integrity verification. 6. If the remote script, redirect destination, hosting infrastructure, or trusted delivery chain is compromised, attacker-controlled commands execute as root. ### Impact Assessment Successful exploitation provides arbitrary com ...[truncated 432 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sudo bash` recommendation from the setup script. 2. Direct users to official, platform-specific Azure CLI installation documentation. 3. Prefer installation through an operating-system package manager configured with Microsoft's signed repository. 4. If an installer must be downloaded: - Pin a specific release and immutable download URL. - Save the file before execution. - Verify its publisher signature or a checksum obtained through an independent trusted channel. - Display the verified script for review. - Avoid root execution unless installation genuinely requires it. 5. Clearly separate dependency installation from the Skill's normal execution and explain why elevated privileges are requested. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/outlook-setup.sh:9
Finding
Unvalidated account names permit credential-path traversal and file overwrite<![CDATA[ ## Vulnerability Details **File Location**: `scripts/outlook-setup.sh`, lines 9-18, 156-168, and 204-206; equivalent path construction also appears in `scripts/outlook-token.sh` lines 7-11 and 34-36, `scripts/outlook-mail.sh` lines 7-11 and 21-25, and `scripts/outlook-calendar.sh` lines 7-11 and 21-25 **Vulnerability Type**: Path traversal and unsafe credential-file handling **Risk Level**: High ### Vulnerable Code The account value is accepted without validation and incorporated into filesystem paths: ```bash # Parse --account flag ACCOUNT="${OUTLOOK_ACCOUNT:-default}" if [ "$1" = "--account" ] || [ "$1" = "-a" ]; then ACCOUNT="$2" shift 2 fi CONFIG_DIR="$BASE_DIR/$ACCOUNT" CONFIG_FILE="$CONFIG_DIR/config.json" CREDS_FILE="$CONFIG_DIR/credentials.json" ``` The resulting paths are then created and written: ```bash save_config() { echo "" echo -e "${YELLOW}Step 5: Saving Configuration${NC}" mkdir -p "$CONFIG_DIR" cat > "$CONFIG_FILE" << EOF { "client_id": "$CLIENT_ID", "client_secret": "$CLIENT_SECRET" } EOF chmod 600 "$CONFIG_FILE" echo -e "${GREEN}✓ Config saved to $CONFIG_FILE${NC}" } ``` OAuth credentials are also written to the attacker-influenced path: ```bash if echo "$TOKEN_RESPONSE" | jq -e '.access_token' > /dev/null 2>&1; then echo "$TOKEN_RESPONSE" > "$CREDS_FILE" chmod 600 "$CREDS_FILE" echo -e "${GREEN}✓ Tokens saved to $CREDS_FILE${NC}" fi ``` ### Technical Analysis `ACCOUNT` can originate from either the `--account` argument or the `OUTLOOK_ACCOUNT` environment variable. No allowlist, canonicalization, traversal check, or base-directory containment check is applied. An account value containing components such as `../../target` causes `CONFIG_DIR` to resolve outside `~/.outlook-mcp`. During setup, the script creates that directory and writes files named `config.json` and `credentials.json` into it. Shell quoting prevents command injection, but it does not prevent ...[truncated 2071 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate account names before any filesystem operation using a conservative allowlist, for example: ```bash validate_account() { case "$ACCOUNT" in ""|"."|".."|*[!A-Za-z0-9._-]*) echo "Error: Invalid account name" >&2 exit 1 ;; esac } ``` 2. Apply identical validation in all four scripts, including values obtained from `OUTLOOK_ACCOUNT`. 3. Canonicalize `BASE_DIR` and `CONFIG_DIR`, then verify that the resolved account directory remains a direct child of `BASE_DIR`. 4. Reject absolute paths, slash characters, traversal components, control characters, and account names beginning with unexpected path syntax. 5. Set `umask 077` before creating credential directories or files. 6. Create the base and account directories with explicit restrictive permissions, such as mode `700`. 7. Refuse to write through symbolic links. Use safe creation methods that provide no-follow and exclusive-creation semantics where available. 8. Write credentials to a securely created temporary file inside the validated account directory, set mode `600`, and atomically rename it into place. 9. Reapply and verify restrictive permissions after token refreshes. 10. Consider replacing plaintext client-secret storage with the operating system's credential manager or keychain. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (104)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The documentation explicitly includes OAuth token refresh, credential storage, account migration, and a command that prints access tokens, yet the declared purpose focuses on email/calendar tasks. Hiding credential-management and token-exposure functions behind a productivity skill materially increases risk because these features can enable account takeover or unauthorized API use.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The documentation explicitly includes OAuth token refresh, credential storage, account migration, and a command that prints access tokens, yet the declared purpose focuses on email/calendar tasks. Hiding credential-management and token-exposure functions behind a productivity skill materially increases risk because these features can enable account takeover or unauthorized API use.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The documentation explicitly includes OAuth token refresh, credential storage, account migration, and a command that prints access tokens, yet the declared purpose focuses on email/calendar tasks. Hiding credential-management and token-exposure functions behind a productivity skill materially increases risk because these features can enable account takeover or unauthorized API use.

Credential Access

High
Category
Privilege Escalation
Content
version: 1.9.0
author: cristiandan
homepage: https://github.com/cristiandan/outlook-skill
metadata: {"clawdbot":{"requires":{"bins":["az","jq"]},"credentials":{"note":"Setup creates Azure App Registration and stores client_id/client_secret/OAuth tokens in ~/.outlook-mcp. The token script can print access tokens. Treat these as sensitive."}}}
---

# Outlook Skill
Confidence
95% confidence
Finding
The metadata explicitly states that setup stores client ID, client secret, and OAuth tokens locally and that the token script can print access tokens. A capability to reveal live bearer tokens is dangerous because anyone who obtains the printed token can directly access Microsoft Graph with the user's privileges until expiry, and refresh-token handling increases persistence risk.

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
./scripts/outlook-mail.sh --account work inbox
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Static analysis

No suspicious patterns detected.