Back to skill

Security audit

Uninstaller

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real OpenClaw uninstaller, but it uses host-level destructive cleanup and has under-scoped install, preservation, scheduling, and credential-backup risks.

Install only if you intentionally want a host-level OpenClaw cleanup tool and are comfortable reviewing shell scripts first. Avoid the curl-to-bash installer, do not rely on the documented --preserve or --preserve all examples, prefer --preserve-state if preserving state, and treat backups as sensitive because they may include credentials and sessions.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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:18
Finding

Unverified Mutable Remote Script Execution

Content
View full analysis
Remediation
View remediation
" "install.sh" | sha256sum -c - less install.sh bash install.sh ``` 5. Document that installation should not be performed from an elevated shell unless strictly required. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/schedule-uninstall.sh:30
Finding

Shell Command Injection Through Scheduled Uninstall Arguments

Content
View full analysis
/dev/null; then echo "macOS uninstall scheduled (launchctl), will run in ~${DELAY}s." ``` The same command string reaches Linux shell interpreters: ```bash if systemd-run --user --onetime --unit=openclaw-uninstall \ /bin/bash -c "$CMD" &>/dev/null; then echo "Linux uninstall scheduled (systemd), will run in ~${DELAY}s." else # Fallback: nohup + disown (works when systemd-run unavailable, e.g. WSL2 without systemd) (nohup bash -c "$CMD" >> "$LOG_FILE" 2>&1 &) ``` ### Technical Analysis Wrapping a value in literal single quotes does not make it safe when the value itself can contain a single quote. An attacker can terminate the intended quoted ar ...[truncated 1900 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/uninstall-oneshot.sh:24
Finding

Unsupported Preservation Option Is Silently Ignored Before Destructive Uninstall

Content
View full analysis
Remediation
View remediation
&2 exit 2 ;; ``` 3. Validate that value-taking options have a following argument before reading `$2`. 4. Require an explicit destructive mode or confirmation when state deletion is requested. 5. In `debug-flow.sh`, use `--preserve-state` and do not allow a debug flag to bypass destructive confirmation unless an additional explicit test-only environment guard is present. 6. Abort deletion if the requested backup fails, unless the user explicitly selected `--no-backup`. 7. Add integration tests that: - Confirm `--preserve-state` leaves the original state directory intact. - Confirm `--preserve all` is rejected rather than ignored. - Confirm unknown and misspelled safety options stop execution. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/uninstall-oneshot.sh:79
Finding

Credentials Are Copied to a Predictable Backup Without Enforced Restrictive Permissions

Content
View full analysis
/dev/null; then log "Creating backup via openclaw backup create..." if openclaw backup create --output "$BACKUP_DIR" --no-include-workspace 2>/dev/null; then BACKUP_ARCHIVE=$(ls -t "$BACKUP_DIR"/*.tar.gz 2>/dev/null | head -1) [[ -n "$BACKUP_ARCHIVE" ]] && log "Backup complete: $BACKUP_ARCHIVE" || log "Backup created but archive path not found" else log "openclaw backup create failed; falling back to manual copy" cp -r "$STATE_DIR/skills" "$BACKUP_DIR/" 2>/dev/null || true cp -r "$STATE_DIR/sessions" "$BACKUP_DIR/" 2>/dev/null || true [[ -f "$STATE_DIR/openclaw.json" ]] && cp "$STATE_DIR/openclaw.json" "$BACKUP_DIR/" 2>/dev/null || true [[ -d "$STATE_DIR/credentials" ]] && cp -r "$STATE_DIR/credentials" "$BACKUP_DIR/" 2>/dev/null || true log "Backup complete (manual): $BACKUP_DIR" fi else log "openclaw not found; manual backup only" cp -r "$STATE_DIR/skills" "$BACKUP_DIR/" 2>/dev/null || true cp -r "$STATE_DIR/sessions" "$BACKUP_DIR/" 2>/dev/null || true [[ -f "$STATE_DIR/openclaw.json" ]] && cp "$STATE_DIR/openclaw.json" "$BACKUP_DIR/" 2>/dev/null || true [[ -d "$STATE_DIR/credentials" ]] && cp -r "$STATE_DIR/credentials" "$BACKUP_DIR/" 2>/dev/null || true log "Backup complete (manual): $BACKUP_D ...[truncated 1802 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
scripts/schedule-uninstall.sh:86
Finding

macOS Fallback Leaves a Loaded Launchd Job and Executable Temporary Files

Content
View full analysis
"$WRAPPER" << WRAPEOF #!/bin/bash sleep $DELAY $EXEC_LINE WRAPEOF chmod +x "$WRAPPER" PLIST_DIR="${TMPDIR:-/tmp}" PLIST="$PLIST_DIR/openclaw-uninstall-$$.plist" cat > "$PLIST" << PLISTEOF Labelopenclaw-uninstall ProgramArguments $WRAPPER RunAtLoad StandardOutPath$LOG_FILE StandardErrorPath$LOG_FILE PLISTEOF launchctl load "$PLIST" 2>/dev/null && echo "macOS uninstall scheduled (plist), will run in ~${DELAY}s." || { echo "Error: launchctl unavailable. Run manually: $UNINSTALL_SCRIPT" rm -f "$PLIST" "$WRAPPER" exit 1 } ``` ### Technical Analysis Scheduling a delayed one-shot task is reasonably related to the declared functionality because the uninstall must continue after the OpenClaw gateway stops. However, the macOS fallback does not constrain the launchd mechanism to the minimum required lifetime. After successful `launchctl load`, neither the wrapper nor the plist performs: - `launchctl unload` or an equivalent `bootout`. - Removal of the generated plist. - Removal of the executable wrapper. - Guaranteed cleanup through a shell trap. The generated plist uses `RunAtLoad`, and the loaded job remains registered until separately unloaded or the relevant launchd domain is reset. The executable temporary wrapper and plist also remain on disk after completion. This is not evidence of a deliberate bac ...[truncated 1262 chars]
Remediation
View remediation
Vulnerability Patterns
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (99)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is presented as an uninstaller, but its Install section includes clawhub star uninstaller --yes && clawhub install uninstaller, which creates external side effects unrelated to uninstalling OpenClaw. Auto-starring and requiring an external service/login are surprising actions that can manipulate user accounts or telemetry under the guise of a maintenance task.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}" is dangerous because it performs recursive deletion based on an environment variable. Although the Notes mention path safety, the command as documented can be copied and run directly without the promised validation, and a manipulated or unexpected OPENCLAW_STATE_DIR could cause deletion of unintended directories under the user's home.

Content

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

md
1. Stop gateway: `openclaw gateway stop`
2. Uninstall service: `openclaw gateway uninstall`
3. Delete state: `rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"`
4. Uninstall CLI: `npm rm -g openclaw` (or pnpm/bun)
5. macOS app: `rm -rf /Applications/OpenClaw.app`

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 · SKILL.md (reported line 108)May include surrounding context.

md
1. Stop gateway: `openclaw gateway stop`
2. Uninstall service: `openclaw gateway uninstall`
3. Delete state: `rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"`
4. Uninstall CLI: `npm rm -g openclaw` (or pnpm/bun)
5. macOS app: `rm -rf /Applications/OpenClaw.app`

### CLI already removed (manual service cleanup)

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 · SKILL.md (reported line 109)May include surrounding context.

md
2. Uninstall service: `openclaw gateway uninstall`
3. Delete state: `rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"`
4. Uninstall CLI: `npm rm -g openclaw` (or pnpm/bun)
5. macOS app: `rm -rf /Applications/OpenClaw.app`

### CLI already removed (manual service cleanup)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

md
### New flag: `--preserve-state`

| Flag | Backup | Delete state dir |
|------|--------|------------------|
| (default) | Yes | Yes |
| `--no-backup` | No | Yes |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · doc/PRESERVE-STATE-PLAN.md (reported line 25)May include surrounding context.

md
### New flag: `--preserve-state`

| Flag | Backup | Delete state dir |
|------|--------|------------------|
| (default) | Yes | Yes |
| `--no-backup` | No | Yes |

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/uninstall-oneshot.sh (reported line 156)May include surrounding context.

sh
### New flag: `--preserve-state`

| Flag | Backup | Delete state dir |
|------|--------|------------------|
| (default) | Yes | Yes |
| `--no-backup` | No | Yes |

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The repository is presented as an uninstall-only skill, but this script performs installation by creating or updating a live symlink under ~/.cursor/skills/uninstaller. That mismatch is security-relevant because users may run it expecting safe cleanup behavior, while it instead alters agent skill loading state and can replace an existing skill path after deleting or moving prior content.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill metadata presents the capability as guidance, but this script actively schedules execution of a host-level uninstall. That mismatch is dangerous because users or higher-level orchestration may assume advisory behavior while the code performs a real destructive action asynchronously.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · SKILL.md (reported line 116)May include surrounding context.

md
case "$(uname -s)" in
  Darwin)
    launchctl bootout "gui/$UID/ai.openclaw.gateway" 2>/dev/null || true
    rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
    for f in ~/Library/LaunchAgents/com.openclaw.*.plist; do
      [[ -f "$f" ]] && rm -f "$f"
    done

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/uninstall-oneshot.sh (reported line 144)May include surrounding context.

sh
case "$(uname -s)" in
  Darwin)
    launchctl bootout "gui/$UID/ai.openclaw.gateway" 2>/dev/null || true
    rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
    for f in ~/Library/LaunchAgents/com.openclaw.*.plist; do
      [[ -f "$f" ]] && rm -f "$f"
    done

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 · scripts/uninstall-oneshot.sh (reported line 146)May include surrounding context.

sh
launchctl bootout "gui/$UID/ai.openclaw.gateway" 2>/dev/null || true
    rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
    for f in ~/Library/LaunchAgents/com.openclaw.*.plist; do
      [[ -f "$f" ]] && rm -f "$f"
    done
    ;;
  Linux)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · SKILL.md (reported line 122)May include surrounding context.

md
;;
  Linux)
    systemctl --user disable --now openclaw-gateway.service 2>/dev/null || true
    rm -f ~/.config/systemd/user/openclaw-gateway.service
    systemctl --user daemon-reload 2>/dev/null || true
    ;;
esac

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/uninstall-oneshot.sh (reported line 151)May include surrounding context.

sh
;;
  Linux)
    systemctl --user disable --now openclaw-gateway.service 2>/dev/null || true
    rm -f ~/.config/systemd/user/openclaw-gateway.service
    systemctl --user daemon-reload 2>/dev/null || true
    ;;
esac

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 · SKILL.md (reported line 109)May include surrounding context.

md
# 6. macOS app
if [[ "$(uname -s)" == "Darwin" ]] && [[ -d "/Applications/OpenClaw.app" ]]; then
  log "Removing macOS app"
  rm -rf /Applications/OpenClaw.app || { log "ERROR: Failed to remove /Applications/OpenClaw.app"; ERRORS+=("macos-app"); }
fi

# Final report

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 · scripts/uninstall-oneshot.sh (reported line 199)May include surrounding context.

sh
# 6. macOS app
if [[ "$(uname -s)" == "Darwin" ]] && [[ -d "/Applications/OpenClaw.app" ]]; then
  log "Removing macOS app"
  rm -rf /Applications/OpenClaw.app || { log "ERROR: Failed to remove /Applications/OpenClaw.app"; ERRORS+=("macos-app"); }
fi

# Final report

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 · scripts/uninstall-oneshot.sh (reported line 199)May include surrounding context.

sh
# 6. macOS app
if [[ "$(uname -s)" == "Darwin" ]] && [[ -d "/Applications/OpenClaw.app" ]]; then
  log "Removing macOS app"
  rm -rf /Applications/OpenClaw.app || { log "ERROR: Failed to remove /Applications/OpenClaw.app"; ERRORS+=("macos-app"); }
fi

# Final report

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 · scripts/uninstall-oneshot.sh (reported line 199)May include surrounding context.

sh
# 6. macOS app
if [[ "$(uname -s)" == "Darwin" ]] && [[ -d "/Applications/OpenClaw.app" ]]; then
  log "Removing macOS app"
  rm -rf /Applications/OpenClaw.app || { log "ERROR: Failed to remove /Applications/OpenClaw.app"; ERRORS+=("macos-app"); }
fi

# Final report