Back to skill

Security audit

Use Cursor

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended to run Cursor in tmux, but its terminal-control implementation is broad and unsafe enough to require review before installation.

Install only after review and preferably in a container or disposable development environment. Avoid using it on machines with valuable secrets or unrelated tmux work, prefer isolated mode, and do not follow curl-to-bash installer guidance without independent verification.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
README.md:27
Finding

Unverified Remote Installer Is Piped Directly into Bash

Content
View full analysis
/dev/null; then AGENT_VER=$(agent --version 2>&1 || echo "unknown") echo "✓ installed ($AGENT_VER)" elif command -v cursor-agent &> /dev/null; then AGENT_VER=$(cursor-agent --version 2>&1 || echo "unknown") echo "✓ installed ($AGENT_VER) (legacy command)" else echo "✗ NOT FOUND - run: curl https://cursor.com/install -fsS | bash" fi ``` ### Technical Analysis The documented command sends the response from a mutable external URL directly to Bash. The downloaded content is not retained for inspection and is not checked against a pinned version, cryptographic checksum, or publisher signature. HTTPS protects the connection under normal conditions, but it does not make the effective payload immutable. A compromise of the remote endpoint, CDN, DNS/TLS trust chain, or installer publishing process could change the commands executed after this Skill has already been reviewed. The URL appears related to the declared Cursor dependency, and no evidence shows that the current endpoint is malicious. Nevertheless, direct remote-to-shell execution is an unsafe supply-chain pattern. The safer download-review-execute instructions elsewhere in `SKILL.md` do not mitigate the active recommendation in the README and diagnostic output. ### Attack Path 1. A user follows the README or copies the recommendation printed by `doctor.sh`. 2. `curl` retrieves the current response from `https://cursor.com/install`. 3. The response is streamed directly to Bash without verification. 4. If the response has been maliciously modified, arbitrary shell commands exec ...[truncated 754 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/spawn.sh:38
Finding

Task and Working-Directory Inputs Are Reinterpreted as Shell Commands inside tmux

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/send.sh:14
Finding

Follow-Up Instructions Can Execute as Shell Commands in a tmux Pane

Content
View full analysis
/dev/null; then echo "Session not found: $SESSION_NAME" exit 1 fi # Send instruction using literal mode (-l) # SECURITY: -l flag sends keys literally, preventing shell metacharacter interpretation # This is safer than default mode where $, `, \, etc. could be interpreted tmux send-keys -t "$SESSION_NAME" -l -- "$COMMAND" Enter ``` ### Technical Analysis The script only verifies that the named tmux session exists. It does not verify: - That the session was created by this Skill. - That the selected pane is still running Cursor. - That Cursor is ready to receive an instruction. - That the pane has not returned to a shell prompt. - That the pane is not running another interactive application. If Cursor fails to start, exits, or completes while leaving a shell active, the supplied `COMMAND` is typed into that shell and submitted with `Enter`. Shell metacharacters are therefore interpreted by the shell. The comments incorrectly state that `-l` prevents shell metacharacter interpretation. It prevents tmux from interpreting the input as tmux key names; it does not change how the application inside the pane processes the characters. ### Attack Path 1. A targeted tmux pane reaches a shell prompt because Cursor exits or fails to start, or an attacker identifies another existing session. 2. The attacker invokes `use_cursor_send` with that session name. 3. The attacker supplies a shell command as the `command` parameter. 4. `send.sh` verifies only that the session exists. 5. tmux types the supplied characters and sends `Enter`. 6. The shell executes the supplied command with the current user's privileges. A race condition also exists: Cursor may exit after any process check but before the keystrokes are deli ...[truncated 610 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/check.sh:12
Finding

Caller-Controlled Session Names Permit Access to Unrelated tmux Sessions

Content
View full analysis
/dev/null; then echo "Session not found: $SESSION_NAME" exit 1 fi # Capture recent output OUTPUT=$(tmux capture-pane -t "$SESSION_NAME" -p -S -200 2>/dev/null || echo "No output yet") ``` `scripts/kill.sh:12-20`: ```bash # Check if session exists if ! tmux has-session -t "$SESSION_NAME" 2>/dev/null; then echo "Session not found: $SESSION_NAME" exit 1 fi # End session tmux kill-session -t "$SESSION_NAME" ``` `scripts/send.sh:14-24`: ```bash # Check if session exists if ! tmux has-session -t "$SESSION_NAME" 2>/dev/null; then echo "Session not found: $SESSION_NAME" exit 1 fi # Send instruction using literal mode (-l) tmux send-keys -t "$SESSION_NAME" -l -- "$COMMAND" Enter ``` ### Technical Analysis The public tools accept a caller-provided session name and operate on any matching tmux session accessible to the same OS account. There is no ownership registry, dedicated tmux socket, unpredictable capability, or validation that the target was created by this Skill. The listing tool filters displayed names by the `cursor-` prefix, but check, send, and kill do not enforce that prefix. A prefix alone would also be insufficient authorization because other applications or users of the same account can create similarly named sessions. tmux uses a user-owned server, so these operations are generally limited to sessions accessible under the same OS account. Within that boundary, however, the Skill can read, control, and destroy unrelated terminal workloads. ### Attack Path 1. An attacker learns or guesses the name of a tmux session running u ...[truncated 1005 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
manifest.json:29
Finding

Declared Security Permissions Materially Understate Effective Child-Process Capabilities

Content
View full analysis
{ // Properly escape all arguments to prevent shell injection // Uses single-quote method: 'input' → 'input'\''s' → safe const escapedArgs = args.map(escapeShellArg); const cmd = `bash ${escapeShellArg(path.join(SCRIPTS_DIR, script))} ${escapedArgs.join(' ')}`; exec(cmd, { encoding: 'utf-8', timeout: 60000, env: { ...process.env, CURSOR_NO_ANALYTICS: '1' } ``` `scripts/spawn.sh:43-46`: ```bash # Run Cursor agent (non-interactive mode + auto model + trust workspace) # SECURITY: Using -l flag for literal mode, entire command sent as single string # TASK is passed as $2 (already escaped by JS layer with single-quote method) tmux send-keys -t "$SESSION_NAME" -l -- "$AGENT_CMD --model auto --print --trust $TASK" Enter ``` ### Technical Analysis The manifest declares access to only two environment variables, no network access, no filesystem writes, and a single configuration-file read. The implementation instead copies the complete parent environment into child processes: ```javascript env: { ...process.env, CURSOR_NO_ANALYTICS: '1' } ``` The Skill then starts a coding agent with `--trust` in a caller-selected workspace. Such an agent is expected to inspect and modify workspace files and communicate with external ...[truncated 1925 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (51)

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The README instructs users to fetch and immediately execute a remote installer via curl ... | bash, which grants arbitrary code from the network direct execution on the user's machine. If the remote endpoint, transport, CDN, or installation script is compromised, users could suffer full code execution, credential theft, or system compromise.

Content

Scanner excerpt · README.md (reported line 28)May include surrounding context.

md
brew install tmux      # macOS

# Install Cursor CLI
curl https://cursor.com/install -fsS | bash

# Authenticate
agent login

Chaining Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

Using | bash removes any opportunity for meaningful inspection between download and execution and is a classic unsafe command-chaining pattern. In a security-sensitive skill centered on automation and shell usage, this pattern is especially dangerous because it normalizes blind execution of remote content despite the README's claims of hardening.

Content

Scanner excerpt · README.md (reported line 28)May include surrounding context.

md
brew install tmux      # macOS

# Install Cursor CLI
curl https://cursor.com/install -fsS | bash

# Authenticate
agent login

YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · SECURITY.md (reported line 115)May include surrounding context.

nt tmux injection // Even with -l flag, newlines in tmux send-keys act as Enter keypress str = str.replace(/[\r\n\t]/g, ' '); // Replace newlines/tabs with spaces str = str.replace(/[\x00-\x1f\x7f]/g, ''); // Remove control chars

text
// Escape single quotes: ' → '\''
const escaped = str.replace(/'/g, "'\\''");
return `'${escaped}'`;

}

// Example: // Input: task'; rm -rf / // Output: 'task'''; rm -rf /' // Shell receives: literal string, no injection possible

// Input with newline (BLOCKED): // Input: "task\nrm -rf /" // After sanitize: "task rm -rf /" // Output: 'task rm -rf /' (newline removed, no injection)

text

### tmux Literal Mode

**ALL** tmux send-keys invocations now use `-l` flag:

```bash
# spawn.sh - cd command
tmux send-keys -t "$SESSION_NAME" -l -- "cd $WORKDIR" Enter

# spawn.sh - agent invocation
tmux send-keys -t "$SESSION_NAME" -l -- "$AGENT_CMD --model auto --print --trust $TASK" Enter

# send.sh - user commands
tmux send-keys -t

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 116)May include surrounding context.

md
// Example:
// Input:  task'; rm -rf /
// Output: 'task'\''; rm -rf /'
// Shell receives: literal string, no injection possible

// Input with newline (BLOCKED):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 122)May include surrounding context.

md
// Example:
// Input:  task'; rm -rf /
// Output: 'task'\''; rm -rf /'
// Shell receives: literal string, no injection possible

// Input with newline (BLOCKED):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 116)May include surrounding context.

md
// Example:
// Input:  task'; rm -rf /
// Output: 'task'\''; rm -rf /'
// Shell receives: literal string, no injection possible

// Input with newline (BLOCKED):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 121)May include surrounding context.

// Input with newline (BLOCKED): // Input: "task\nrm -rf /" // After sanitize: "task rm -rf /" // Output: 'task rm -rf /' (newline removed, no injection)

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 155)May include surrounding context.

md
↓
bash script.sh 'task'\''; rm /'
    ↓
script receives: $TASK = task'; rm /  (literal string)
    ↓
tmux send-keys -l -- "agent --trust $TASK"
    ↓

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 159)May include surrounding context.

md
↓
bash script.sh 'task'\''; rm /'
    ↓
script receives: $TASK = task'; rm /  (literal string)
    ↓
tmux send-keys -l -- "agent --trust $TASK"
    ↓

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The code is related to tmux-based task handling, so it is partially aligned with the declared domain. However, this specific chunk is a status-check/inspection utility, not a general task management implementation. It also captures and prints recent tmux pane output, which is a concrete capability not reflected in the description. Additionally, the declared description emphasizes security hardening, but no security-hardening controls are evident in this script beyond basic shell error handling and argument presence checks. Therefore the description does not accurately represent this code chunk's actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The declared purpose emphasizes managing Cursor CLI tasks via tmux with security hardening, but this code does not manage tasks or interact with tmux sessions beyond checking whether tmux is installed. Its primary function is environment validation: detecting installed tools, checking authentication status via CURSOR_API_KEY and local Cursor config files, and summarizing issues. While these checks may support a larger tmux-based Cursor workflow, this specific code chunk is a doctor/diagnostic utility rather than a task manager, so the description does not accurately represent the actual behavior.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

brew install --cask cursor-cli

Alternative: official installer (review at https://cursor.com/install)

curl https://cursor.com/install -fsS | bash

text

**Linux/WSL:**

Chaining Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

brew install --cask cursor-cli

Alternative: official installer (review at https://cursor.com/install)

curl https://cursor.com/install -fsS | bash

text

**Linux/WSL:**

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 115)May include surrounding context.

md
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 116)May include surrounding context.

md
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 121)May include surrounding context.

md
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY.md (reported line 122)May include surrounding context.

md
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · extensions/use-cursor/index.js (reported line 49)May include surrounding context.

js
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · extensions/use-cursor/index.js (reported line 50)May include surrounding context.

js
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · extensions/use-cursor/index.js (reported line 51)May include surrounding context.

js
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · extensions/use-cursor/index.js (reported line 52)May include surrounding context.

js
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · SECURITY.md (reported line 115)May include surrounding context.

md
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · SECURITY.md (reported line 116)May include surrounding context.

md
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · extensions/use-cursor/index.js (reported line 49)May include surrounding context.

js
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · extensions/use-cursor/index.js (reported line 50)May include surrounding context.

js
* - Only ' itself needs special handling
 * 
 * Example:
 *   Input:  task'; rm -rf /; echo '
 *   Step 1: Replace ' with '\''  →  task'\''; rm -rf /; echo '\''
 *   Step 2: Wrap in '...'        →  'task'\''; rm -rf /; echo '\''
 *   Shell receives: literal string "task'; rm -rf /; echo '", no injection