Back to skill

Security audit

Claude for Safari

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-built for Safari automation, but it grants broad access to a real logged-in browser and includes unsafe temporary-file execution that users should review before installing.

Install only if you are comfortable granting an agent control over your real Safari session, including logged-in pages. Prefer reviewing or pinning the exact source revision before install, avoid use on banking, admin, healthcare, or other sensitive sites, approve browser actions narrowly, and treat the /tmp screenshot-helper commands as needing repair before routine use.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T07 · Tool Hijacking and Spoofing

Error
Location
SKILL.md:123
Finding
Execution of an Untrusted Binary from Predictable Shared Temporary Storage<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 123-152 **Vulnerability Type**: Unsafe temporary-file handling and local tool spoofing **Risk Level**: High ### Vulnerable Code ```bash # Test if Screen Recording permission is granted (background screenshot available) /tmp/safari_wid 2>/dev/null && echo "BACKGROUND_SCREENSHOT=true" || echo "BACKGROUND_SCREENSHOT=false" ``` ```bash # Compile the helper once per session (if not already compiled) if [ ! -f /tmp/safari_wid ]; then cat > /tmp/safari_wid.swift << 'SWIFT' import CoreGraphics import Foundation let options: CGWindowListOption = [.optionOnScreenOnly, .excludeDesktopElements] guard let windowList = CGWindowListCopyWindowInfo(options, kCGNullWindowID) as? [[String: Any]] else { exit(1) } for window in windowList { guard let owner = window[kCGWindowOwnerName as String] as? String, owner == "Safari", let layer = window[kCGWindowLayer as String] as? Int, layer == 0, let wid = window[kCGWindowNumber as String] as? Int else { continue } print(wid) exit(0) } exit(1) SWIFT swiftc /tmp/safari_wid.swift -o /tmp/safari_wid fi # Capture Safari window in background (no activation needed) WID=$(/tmp/safari_wid) screencapture -l "$WID" -o -x /tmp/safari_screenshot.png ``` ### Technical Analysis The Skill uses fixed paths in the system-wide temporary directory and executes `/tmp/safari_wid` before establishing that it was created by the current Skill invocation. The later existence check only verifies that the path is a regular file; it does not verify ownership, permissions, provenance, integrity, or whether the path was safely created. Because `/tmp` is shared and the filename is predictable, another local process or user can pre-create or replace `/tmp/safari_wid`. The initial capability test then executes the attacker-controlled file immediately. The subsequent compilation block also trusts an already existing file and skips rebuilding i ...[truncated 1831 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create a private, per-invocation directory rather than using fixed paths: ```bash TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/claude-safari.XXXXXX") || exit 1 chmod 700 "$TMP_DIR" trap 'rm -rf "$TMP_DIR"' EXIT INT TERM ``` 2. Place the Swift source, compiled helper, and screenshot inside that private directory: ```bash SRC="$TMP_DIR/safari_wid.swift" BIN="$TMP_DIR/safari_wid" SCREENSHOT="$TMP_DIR/safari_screenshot.png" ``` 3. Compile the helper during the current invocation and never execute a pre-existing binary from a shared path. 4. Check compilation success before execution: ```bash swiftc "$SRC" -o "$BIN" || exit 1 chmod 700 "$BIN" ``` 5. Verify that the temporary directory and helper are owned by the current user and are not symbolic links before use. 6. Apply restrictive permissions with `umask 077` so screenshots and generated files cannot be read by other local users. 7. Avoid a separate “execute to detect availability” step. Compile the trusted helper first, then execute only the binary created in the private directory. 8. Remove all temporary artifacts reliably through a cleanup trap, including on interruption or failure. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:36
Finding
Unpinned Installation from a Mutable Third-Party Source<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 36 and 50; `README_CN.md`, lines 34 and 46 **Vulnerability Type**: Mutable and unverified supply-chain installation **Risk Level**: Medium ### Vulnerable Code The installation command is documented repeatedly in both README files: ```bash npx skills add SDLLL/claude-for-safari ``` ### Technical Analysis The command invokes an `npx`-based installer and identifies the Skill through a mutable GitHub owner/repository reference. It does not pin the installation to an immutable commit, reviewed release artifact, package version, checksum, or cryptographic signature. Consequently, the content installed when a user runs the command can differ from the content covered by this audit. Changes to the upstream repository, compromise of the repository owner, compromise of the package-resolution path, or changes in installer behavior could cause users to receive unreviewed Skill instructions or files. No malicious dependency or remote payload was found in the audited files. The vulnerability is the absence of integrity and immutability controls in the documented installation process, rather than evidence that the current repository content is malicious. ### Attack Path 1. An attacker compromises the upstream repository account, gains unauthorized write access, or otherwise causes the mutable repository reference to serve altered content. 2. The attacker adds malicious Skill instructions, scripts, or other files to the version resolved by the installation command. 3. A user follows the README and runs `npx skills add SDLLL/claude-for-safari`. 4. The installer retrieves the current upstream content rather than the exact revision covered by this audit. 5. The user's agent loads or follows the substituted Skill content. 6. The malicious update can then act within whatever tool access and permissions the user grants to the agent. ### Impact Assessment The immediate scope is the integrity of the ins ...[truncated 571 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin installation instructions to an immutable, reviewed commit hash or a fixed release version rather than a mutable repository reference. 2. Publish signed release artifacts and provide a SHA-256 or stronger digest that users can verify before installation. 3. Document the exact audited revision and ensure the installation command resolves to that revision. 4. Pin the `npx` installer package itself to a reviewed version where supported, rather than allowing implicit retrieval of a mutable latest version. 5. Prefer an installation workflow that downloads the artifact without executing package lifecycle code, verifies its signature or checksum, and only then installs it. 6. Protect repository releases with multi-factor authentication, branch protection, required review, signed commits or tags, and restricted publishing credentials. 7. Update both `README.md` and `README_CN.md` so all installation examples use the same immutable and verifiable source. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The README instructs users to install and execute the skill via `npx skills add SDLLL/claude-for-safari` without pinning a specific version or commit. Because this skill is designed to control the user's real Safari browser, capture screenshots, and execute JavaScript in page context, a compromised or newly published version could immediately gain powerful local automation capabilities and access sensitive browsing data.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
Referencing `npx skills` again reinforces an unpinned remote installation/execution workflow, which exposes users to supply-chain risk if the package, dependency chain, or fetched repository content changes. In this skill's context, that risk is amplified because the installed skill can drive Safari through AppleScript, run arbitrary page JavaScript, and take screenshots of live browser content.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README advertises powerful capabilities—reading pages, executing arbitrary JavaScript in page context, taking screenshots, clicking, and form input—without a prominent upfront warning about privacy, credential exposure, session misuse, or destructive browser actions. In this skill's context, that omission is more dangerous because it controls the user's real Safari instance with access to live sessions, sensitive web content, and authenticated accounts.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list is very broad and includes generic terms like "browser", "browse", "read this site", and "click on", which can cause the skill to activate in situations where the user did not specifically intend Safari automation. Because this skill controls the user's real logged-in Safari session, unintended invocation could expose page contents, cookies-backed account state, or cause accidental actions in active tabs.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly states it has full access to the user's real Safari session, including login state, cookies, and open tabs, but the operational guidance does not require a clear consent or warning step before reading content, listing tabs, taking screenshots, or executing JavaScript. In this context, the lack of a mandatory user-consent checkpoint materially increases the risk of unauthorized access to sensitive browsing data and actions on authenticated websites.

Natural-Language Policy Violations

Low
Confidence
79% confidence
Finding
This manifest includes both README.md and README_CN.md in the published package, indicating multilingual documentation support, but the package metadata does not state how language selection is handled for users. Because locale/language handling is the only policy area in scope for all file types, the absence of any documented opt-in or selection mechanism may create ambiguity about whether a specific language is imposed by default.

Static analysis

No suspicious patterns detected.