Back to skill

Security audit

simplisafe-mcp

Security checks for vulnerabilities and agentic risk

Overview

The home-security controls are clearly explained, but unsafe token caching could let a local attacker execute commands or obtain alarm-system access.

Wait for corrected cache handling before connecting a real alarm account. The fix should use private, verified storage, secure file replacement, and strictly numeric expiry validation. Review the separately supplied login script, retain confirmation for alarm and lock changes, and display PINs only when explicitly requested. No live account behavior was tested.

Vulnerability Patterns
  • 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
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
references/ss-helpers.sh
Finding

Attacker-precreated shared token cache enables Bash arithmetic injection

Content
View full analysis

Impact

Arbitrary command execution with the victim's privileges, potentially exposing the SimpliSafe refresh token and enabling unauthorized alarm or lock operations. This exceeds a temporary-file robustness issue because attacker-controlled file content reaches shell execution.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

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 46)May include surrounding context.

md
`ss_api <METHOD> <PATH> [JSON_BODY]` attaches auth, prints the body on stdout,
and on a non-2xx prints to **stderr** and returns 1 — so a failure never looks
like an empty result. Access tokens are cached in `$TMPDIR` (0600) and re-minted
only when stale; the helpers never write to the repo's `.env`.

## Resolve first

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The cache described here uses a predictable filename under TMPDIR, falling back to shared /tmp, without verifying file ownership or rejecting symlinks. An attacker able to pre-create that path can arrange for the bearer token to be written into an attacker-readable file, because umask does not change existing file permissions; a stolen token can control the alarm and locks.

Content

Scanner excerpt · references/ss-helpers.sh (reported line 17)May include surrounding context.

sh
#   not rotate refresh tokens, so there is nothing to write back, and the MCP
#   server's own state is never touched.
#
#   The minted access token is cached in this skill's OWN state file under
#   TMPDIR (mode 0600), never in the repo's .env.

SS_CLIENT_ID='42aBZ5lYrVW12jfOuu3CQROitwxg9sN5'

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The referenced token function reads an existing predictable cache without checking ownership or permissions and later writes it using ordinary shell redirection. This is the same cache vulnerability identified at line 17: an attacker-precreated writable file can retain permissive access despite umask 077, exposing credentials for a physical security system.

Content

Scanner excerpt · references/ss-helpers.sh (reported line 49)May include surrounding context.

sh
return 1
}

# Print a valid access token, minting one only when the cache is cold or stale.
# SimpliSafe access tokens last 3600s; refresh 120s early to avoid a race.
ss_access_token() {
  local now

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 · references/ss-helpers.sh (reported line 50)May include surrounding context.

sh
}

# Print a valid access token, minting one only when the cache is cold or stale.
# SimpliSafe access tokens last 3600s; refresh 120s early to avoid a race.
ss_access_token() {
  local now
  now=$(date +%s)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ss-helpers.sh (reported line 22)May include surrounding context.

sh
SS_CLIENT_ID='42aBZ5lYrVW12jfOuu3CQROitwxg9sN5'
SS_AUTH_URL='https://auth.simplisafe.com/oauth/token'
SS_API_BASE='https://api.simplisafe.com/v1'
SS_TOKEN_CACHE="${TMPDIR:-/tmp}/simplisafe-skill-token.json"

# Resolve the refresh token. Prints it, or fails with an actionable message.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/ss-helpers.sh (reported line 76)May include surrounding context.

sh
body=$(jq -nc --arg cid "$SS_CLIENT_ID" --arg rt "$rt" \
    '{grant_type:"refresh_token", client_id:$cid, refresh_token:$rt}')

  response=$(curl -sS -X POST "$SS_AUTH_URL" -H 'Content-Type: application/json' -d "$body") || return 1
  access=$(printf '%s' "$response" | jq -r '.access_token // ""')

  if [ -z "$access" ]; then