Back to skill

Security audit

desktop mouse

Security checks for vulnerabilities and agentic risk

Overview

This desktop mouse skill matches its stated purpose, but its wrapper has environment-variable escape hatches that could run unintended local code and should be reviewed before installation.

Install only if you trust the local environment that will launch it and need agent-controlled desktop input. Prefer a version that pins /usr/bin/ydotool, validates all numeric environment settings, clearly documents every supported mouse action, and requires explicit user direction before clicks, holds, or drags.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
molt-mouse.txt:17
Finding

Command Execution Through Unvalidated Arithmetic Environment Variable

Content
View full analysis
max )) && v=$max (( v<-max )) && v=-$max echo "$v" } ``` An affected call site is: ```bash max="${MOLT_MOUSE_MAX_DELTA:-2000}" dx="$(clamp_int "$dx" "$max")" dy="$(clamp_int "$dy" "$max")" ``` Equivalent call sites occur in the `drag` and `drag-smooth` command implementations. ### Technical Analysis `MOLT_MOUSE_MAX_DELTA` is accepted from the inherited process environment without validation and is passed to `clamp_int`. Inside that function, the value is referenced as the arithmetic variable `max` in Bash arithmetic expressions: ```bash (( v>max )) (( v<-max )) ``` Bash arithmetic evaluation treats variable contents as arithmetic expressions and can recursively interpret expression syntax. Consequently, an attacker-controlled environment value is not handled strictly as an integer. A malicious arithmetic expression can trigger shell-side evaluation, including command substitution when crafted using an applicable Bash arithmetic expression structure. The user-provided mouse coordinates are validated with an integer regular expression, but the security-sensitive maximum value is not. This creates an environment-based command-injection boundary in the `move`, `drag`, and `drag-smooth` paths. Exploitation requires the attacker to influence the environment inherited by `molt-mouse`, such as through a compromised launcher, gateway configuration, service environment, or another process responsible for invoking the wrapper. ### Attack Path 1. The attacker obtains the ability to set or modify `MOLT_MOUSE_MAX_DELTA` in the environment inherited by the wrapper. 2. The attacker assigns a malicious Bash arithmetic ex ...[truncated 1117 chars]
Remediation
View remediation
= 1 && max <= 100000 )) || die "MOLT_MOUSE_MAX_DELTA is outside the permitted range" ``` Additional hardening measures should include: 1. Use a fixed default when an invalid value is encountered, or terminate safely. 2. Apply explicit lower and upper bounds to prevent excessive or nonsensical values. 3. Validate `MOLT_MOUSE_MIN_HOLD`, `MOLT_MOUSE_MAX_HOLD`, and `MOLT_MOUSE_STEP_SLEEP` before passing them to `awk` or `sleep`. 4. Start the gateway process with a minimal, explicitly constructed environment rather than inheriting arbitrary variables. 5. Add regression tests using malformed arithmetic expressions to ensure configuration values are always treated as plain numeric data. ]]>

T07 · Tool Hijacking and Spoofing

Error
Location
molt-mouse.txt:4
Finding

Environment-Controlled Substitution of the Trusted ydotool Executable

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This skill performs direct mouse clicks without any user-facing confirmation, safety interlock, or explicit consent check. In the context of a desktop mouse-control wrapper, synthetic pointer input can trigger unintended UI actions such as approving prompts, moving files, closing applications, or interacting with privileged dialogs, so silent execution is meaningfully risky even though the script itself is not overtly malicious.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The inline comment uses Turkish ('bash numeric compare için awk kullanalım'), introducing a language-specific instruction in a file that otherwise appears generally usable. This can violate language policy expectations when the skill does not document or offer language choice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.