T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:31- Finding
Unverified Remote Installer Piped Directly into Shell Interpreters
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Cursor Agent CLI helper, but it recommends unsafe installer execution and high-authority agent modes that users should review before installing.
Install only if you intend to use Cursor Agent CLI and are comfortable with a powerful coding agent that can modify files, run in CI, use cloud/background execution, and persist sessions. Avoid the documented pipe-to-shell installer unless you independently verify the official installer, prefer plan/read-only modes first, avoid --force/--yolo/--trust on untrusted code, do not disable sandboxing casually, and keep API keys out of command history and logs.
SKILL.md:31Unverified Remote Installer Piped Directly into Shell Interpreters
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
# Use GPT-5 for complex refactoring
agent --model gpt-5.2 "refactor monolith into microservices"
# Use Sonnet-4 for careful analysis
agent --model sonnet-4-thinking "analyze potential race conditions"
The installation instruction fetches a remote script and pipes it directly into bash, which executes code from the network without prior inspection or integrity verification. If the server, transport, or install endpoint is compromised, users could immediately run attacker-controlled commands on their systems.
# Install Cursor Agent CLI
curl https://cursor.com/install -fsS | bash
# Verify
agent --version
The use of '| bash' creates a direct execution chain from untrusted remote content into a shell, removing any pause for validation and making command injection or malicious installer changes immediately effective. In a developer skill README, this is especially dangerous because users may copy-paste the command into privileged environments or CI systems.
# Install Cursor Agent CLI
curl https://cursor.com/install -fsS | bash
# Verify
agent --version
The installation instructions fetch and execute a remote script directly from the network using curl|bash and PowerShell iex. This pattern eliminates meaningful inspection and makes users dependent on transport security and the remote host's integrity; if the endpoint, CDN, or connection is compromised, arbitrary code executes immediately.
# macOS, Linux, WSL
curl https://cursor.com/install -fsS | bash
# Windows PowerShell
irm 'https://cursor.com/install?win32=true' | iex
The pipe-to-shell construction is a classic command-chaining abuse pattern because untrusted remote content flows directly into an interpreter. In the context of a shell-capable skill for developers, this is especially dangerous because it teaches an unsafe execution habit and can produce immediate host compromise if the fetched script is tampered with.
# macOS, Linux, WSL
curl https://cursor.com/install -fsS | bash
# Windows PowerShell
irm 'https://cursor.com/install?win32=true' | iex
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
# Run with specific prompt
agent -p "find and fix performance issues" --model "gpt-5.2"
# Code review
agent -p "review these changes for security issues" --output-format text
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
agent --list-models
agent --model "gpt-5.2" agent --model "sonnet-4" agent --model "sonnet-4-thinking"
The script instructs users to install the agent by piping a remote script directly into bash, which bypasses review and executes network-fetched code immediately. In a developer tooling context, this is especially dangerous because compromise of the distribution endpoint, TLS interception, or a malicious installer would lead to arbitrary code execution on the user's machine.
# Check if agent is installed
if ! command -v $AGENT_BIN &> /dev/null; then
echo "❌ Cursor Agent CLI not found!"
echo "Install: curl https://cursor.com/install -fsS | bash"
exit 1
fi
The script recommends installing software via a direct network fetch piped into a shell (curl ... | bash), which is a well-known unsafe pattern because it executes remote content without verification. If the remote server, CDN, DNS path, or TLS trust chain were compromised, a user following the printed instruction could execute attacker-controlled code on their machine.
agent --version
else
echo "❌ agent command not found"
echo "Install: curl https://cursor.com/install -fsS | bash"
exit 1
fi
echo ""
The example explicitly promotes --force for non-interactive bug fixing without warning that approval gates are bypassed and files may be modified automatically. In a coding-agent skill, this can normalize unsafe automation and lead users or downstream wrappers to run destructive code changes without human review.
The phrase 'auto-approved bug fixing' describes autonomous code modification without human approval, which is risky for a tool capable of editing and executing changes. In this skill's context, that behavior is more dangerous because users may assume examples are safe defaults and deploy them in production workflows.
agent -p "find and fix the memory leak in server.js" --force
**Non-interactive, auto-approved bug fixing.**
## Example 3: Code Review
The CI/CD example combines --trust with repository workspace access in an automated pipeline, but provides no warning about elevated permissions or the risk of acting on untrusted repository content. In this context, the agent may process and act on attacker-controlled code or prompts from pull requests, increasing the chance of unsafe automated behavior or data exposure.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Create isolated worktree for feature
agent -w feature-auth --worktree-base main "implement OAuth2 authentication"
# Work continues in ~/.cursor/worktrees/myrepo/feature-auth
The custom header example embeds a bearer token directly in a command line, which can leak secrets through shell history, process listings, CI logs, and copied documentation. In an agent/CLI integration skill, examples are often copied verbatim, so this materially increases the chance of credential mishandling.
The README explicitly advertises a default 'Full access' mode that can modify code, but it does not warn users that running the agent may change local files or that outputs should be reviewed before acceptance. In a terminal-integrated coding agent skill, that omission increases the chance users will invoke destructive or unsafe edits without understanding the consequences.
The skill exposes shell-execution capability through examples and integration snippets but does not declare an explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, missing scope declarations weakens containment and makes it easier for the skill to be invoked with broader execution powers than users or orchestrators may expect.
The description includes broad triggers like AI coding, code generation, refactoring, and interactive programming sessions, which can match many ordinary requests. Overbroad activation increases the chance this shell-capable skill is selected unnecessarily, exposing users to command execution pathways in contexts where a safer or narrower skill would suffice.
The documented auto-approve capability enables the agent to make decisions and execute actions without human review. In a coding-agent skill with shell access, autonomy can turn prompt mistakes, bad model output, or malicious repository instructions into immediate filesystem or command-side effects.
# Auto-approve all commands
The skill prominently documents force mode, yolo mode, sandbox disabling, and approval-bypassing behavior without an equally prominent warning that these settings reduce safeguards and can lead to unreviewed code execution or file modification. In a terminal agent context, this materially increases the risk of destructive or unsafe actions being performed automatically.
The explicit commands agent --force and agent --yolo instruct the tool to auto-approve all commands, removing a key human-in-the-loop safety control. Because this skill is for interactive coding and terminal use, exploitation could lead to arbitrary command execution, mass file edits, or unsafe git operations without review.
# Auto-approve all commands
agent --force "build the feature"
agent --yolo "build the feature" # Alias
Auto-approving MCP servers reduces scrutiny over external tool integrations that may expand the agent's reach or data access. In practice, this can let the agent attach to additional capabilities or remote services without adequate review, broadening the attack surface.
agent mcp
agent --approve-mcps
The CI examples recommend using --trust in headless automation, which suppresses workspace trust protections in an environment where code may come from pull requests or other less-trusted sources. That creates a realistic path for untrusted repository content to influence a powerful coding agent with reduced safety checks.
The example normalizes non-interactive auto-approved operation for code generation tasks. Even if intended for convenience, presenting auto-approval in examples encourages unsafe operational habits and can lead users to run high-impact modifications without inspection.
$ agent -p "generate comprehensive tests for src/api/*.js" --force
Non-interactive, auto-approved test generation.
### Example 3: Code Review in CI
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
Options (pass after command):
--model <model> Specify model (gpt-5, sonnet-4, etc.)
--force, --yolo Auto-approve all commands
--output-format <fmt> Output format (text, json, stream-json)
--workspace <path> Specify workspace directory
--sandbox <mode> Sandbox mode (enabled, disabled)
This shell script is a code file, so missing-warning checks apply. The help output advertises --force, --yolo as Auto-approve all commands, but there is no adjacent warning, confirmation, or caution that this may allow potentially impactful actions to run without review.
No suspicious patterns detected.