Back to skill

Security audit

OpenClaw Mobile Pair

Security checks for vulnerabilities and agentic risk

Overview

This skill is for mobile pairing, but it relies on a missing relative PowerShell script that would read a local gateway token while bypassing PowerShell execution policy.

Review this before installing. Only use it if you trust the missing generator script that will be available at runtime, understand where the BFF URL sends data, and are comfortable with a local gateway token being read for pairing-code generation. Prefer a version that bundles or pins the script, avoids execution-policy bypass, resolves scripts from the skill install directory, and documents token handling.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:14
Finding
Unsafe PowerShell Execution-Policy Bypass for an Unavailable Relative Script<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 14–24 **Vulnerability Type**: Unsafe execution configuration and untrusted relative script resolution **Risk Level**: Medium ### Vulnerable Code ```markdown 2. Run `scripts/generate-mobile-pairing.ps1` to generate pairing code. 3. Return: - Pairing code - Output file path - Quick next step for mobile user ## Command Template ```powershell powershell -ExecutionPolicy Bypass -File scripts/generate-mobile-pairing.ps1 -BffBaseUrl "<https://api.yourdomain.com/>" -CopyToClipboard ``` ``` ### Technical Analysis The skill directs the agent to execute `scripts/generate-mobile-pairing.ps1` with PowerShell's execution policy bypassed. However, the audited package contains only `SKILL.md` and `VERSION.txt`; the referenced script is absent. Because `-File` uses a relative path, script resolution may depend on the process's current working directory rather than a verified package directory. If an attacker can create or replace `scripts/generate-mobile-pairing.ps1` at the resolved location, the agent may execute attacker-controlled PowerShell code. The `-ExecutionPolicy Bypass` option suppresses an execution-policy safeguard that could otherwise prevent or warn about execution of an untrusted script. The skill metadata also claims that the operation automatically reads the local gateway token. Since the implementation is unavailable, its handling of that authentication material cannot be audited. It is therefore impossible to verify whether the token would be embedded in the pairing code, copied to the clipboard, written to a file, or transmitted to the supplied BFF endpoint. ### Attack Path 1. The attacker obtains write access to the agent's working directory or otherwise influences the directory from which the relative script path is resolved. 2. The attacker creates a malicious file at `scripts/generate-mobile-pairing.ps1`. 3. A user invokes the mobile-pairing skill. 4. The agent fo ...[truncated 1159 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Include `scripts/generate-mobile-pairing.ps1` in the distributed package so its behavior and token handling can be reviewed. 2. Remove `-ExecutionPolicy Bypass`. Use an appropriately signed script and an execution policy consistent with the deployment environment. 3. Resolve the script from the trusted skill installation directory using a canonical absolute path rather than relying on the current working directory. 4. Before execution, verify that the canonical script path remains inside the expected package directory and reject symbolic links, path traversal, or unexpected replacements. 5. Verify the script's integrity using a trusted signature or pinned cryptographic hash. 6. Validate the BFF URL, require HTTPS, and restrict connections to explicitly trusted hosts where operationally feasible. 7. Ensure the gateway token is never embedded in reusable pairing output, logged, copied to the clipboard, or written to plaintext files. 8. Store generated output with restrictive permissions and a short expiration time, and redact sensitive values from errors and diagnostic output. 9. Fail safely when the script is missing rather than searching for or executing a same-named file from another location. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly states it will automatically read a local gateway token, but the user-facing description and workflow do not clearly warn that a sensitive local credential is being accessed as part of pairing-code generation. This creates a transparency and consent problem: users may invoke the skill without understanding that local authentication material is being read and potentially transformed into a pairing artifact.

External Transmission

Medium
Category
Data Exfiltration
Content
## Command Template

```powershell
powershell -ExecutionPolicy Bypass -File scripts/generate-mobile-pairing.ps1 -BffBaseUrl "<https://api.yourdomain.com/>" -CopyToClipboard
```

## Response Style
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.