Back to skill

Security audit

Llmrouter

Security checks for vulnerabilities and agentic risk

Overview

This skill is a legitimate LLM routing guide, but it asks users to run mutable remote code as a long-running proxy that can handle prompts and API credentials.

Install only if you are comfortable reviewing and running the external llmrouter repository. Prefer a pinned, reviewed commit; keep the service bound to localhost; avoid the LaunchAgent unless you need always-on routing; protect config, logs, and API tokens; and use local classification for sensitive prompts when possible.

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

T06 · System Persistence

Error
Location
SKILL.md:203
Finding

Persistent execution through a macOS LaunchAgent

Content
View full analysis
ProgramArguments /path/to/llmrouter/venv/bin/python /path/to/llmrouter/server.py --openclaw RunAtLoad KeepAlive WorkingDirectory /path/to/llmrouter StandardOutPath /path/to/llmrouter/logs/stdout.log StandardErrorPath /path/to/llmrouter/logs/stderr.log ``` ```bash # Load the service launchctl load ~/Library/LaunchAgents/com.llmrouter.plist # Verify it's running curl http://localhost:4001/health # To stop/restart launchctl unload ~/Library/LaunchAgents/com.llmrouter.plist launchctl load ~/Library/LaunchAgents/com.llmrouter.plist ``` ### Technical Analysis The documented LaunchAgent executes `server.py` whenever the user session loads. Setting both `RunAtLoad` and `KeepAlive` causes the process to start automatically and be restarted after termination. A continuously available service may be convenient for an LLM proxy, but it is not necessary for the Skill's basic routing functionality. The document already supports foreground, user-initiated execution with `python server.py`. Consequently, persistent execution exceeds the minimum lifecycle privileges required to demonstrate or use the router. The LaunchAgent runs downloaded project code with the permissions of the logged-in user. It does not directly grant root privileges, but it creates a durable execution point for code that is outside the audited artifact. ### Attack Path 1. A user clones the external router repository and installs its dependencies. 2. The user creates `~/Library/LaunchAgents/com.llmrouter.plist` using the documented configuration. 3. The user executes `launchctl load ~/Library/La ...[truncated 975 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:28
Finding

Mutable remote code is retrieved, installed, and executed without integrity verification

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (14)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly supports remote classifiers and providers, which means user prompts and related request content may be transmitted to third-party services. The documentation does not clearly warn users about this data flow, creating a privacy and confidentiality risk, especially if sensitive prompts are routed externally without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

The router exposes an OpenAI-compatible API:

bash
curl http://localhost:4001/v1/chat/completions \
  -H "Authorization: Bearer $ANTHROPIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

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

Testing Classification

bash
python classifier.py "Write a Python sort function"
# Output: medium

python classifier.py --test

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

The skill documents installing the router as a macOS LaunchAgent, which establishes persistence by automatically starting the service on login and keeping it alive. Persistence is not inherently malicious in a service deployment context, but it increases risk because a network-facing proxy handling prompts and API credentials will continue running in the background and may expose data or expand attack surface if misconfigured or compromised.

Content

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

Running as macOS Service

Create ~/Library/LaunchAgents/com.llmrouter.plist:

xml
<?xml version="1.0" encoding="UTF-8"?>

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This duplicate match refers to the same LaunchAgent persistence block. The persistence itself is real and should be treated as a security-relevant behavior even though the apparent intent is ordinary service management.

Content

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

xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This duplicate match refers to the same LaunchAgent persistence block. The persistence itself is real and should be treated as a security-relevant behavior even though the apparent intent is ordinary service management.

Content

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

xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>

Session Persistence

Medium
Category
Rogue Agent
Confidence
92% confidence
Finding

The plist service definition underlies a persistent background process. In context, this is a legitimate operational feature, but it still matters because the service proxies potentially sensitive LLM traffic and can survive user session changes or restarts, increasing dwell time if abused.

Content

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

xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.llmrouter</string>

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This is still part of the LaunchAgent persistence example and reinforces creation of an auto-starting background service. The main risk is not malware-like persistence but long-running exposure of a local API, logs, and credential-bearing configuration.

Content

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

StandardErrorPath /path/to/llmrouter/logs/stderr.log

text

**Important:** Replace `/path/to/llmrouter` with your actual install path. Must use the venv python, not system python.

Session Persistence

Medium
Category
Rogue Agent
Confidence
92% confidence
Finding

This duplicate finding points to the same persistence-enabling command. The command itself is not malicious, but it operationalizes continuous execution of a proxy that handles sensitive prompt and credential flows.

Content

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

md
mkdir -p ~/path/to/llmrouter/logs

# Load the service
launchctl load ~/Library/LaunchAgents/com.llmrouter.plist

# Verify it's running
curl http://localhost:4001/health

Session Persistence

Medium
Category
Rogue Agent
Confidence
92% confidence
Finding

This duplicate finding points to the same persistence-enabling command. The command itself is not malicious, but it operationalizes continuous execution of a proxy that handles sensitive prompt and credential flows.

Content

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

md
mkdir -p ~/path/to/llmrouter/logs

# Load the service
launchctl load ~/Library/LaunchAgents/com.llmrouter.plist

# Verify it's running
curl http://localhost:4001/health

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The unload/load restart instructions are part of managing a persistent LaunchAgent. Once configured, the router remains a durable background component, which is security-relevant because it may store logs and mediate sensitive user requests over time.

Content

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

curl http://localhost:4001/health

To stop/restart

launchctl unload ~/Library/LaunchAgents/com.llmrouter.plist launchctl load ~/Library/LaunchAgents/com.llmrouter.plist

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This duplicate match refers to the same persistent-service control flow. The persistence is real, but the intent appears operational rather than malicious.

Content

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

To stop/restart

launchctl unload ~/Library/LaunchAgents/com.llmrouter.plist launchctl load ~/Library/LaunchAgents/com.llmrouter.plist

text

## OpenClaw Configuration

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This duplicate match refers to the same persistent-service control flow. The persistence is real, but the intent appears operational rather than malicious.

Content

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

To stop/restart

launchctl unload ~/Library/LaunchAgents/com.llmrouter.plist launchctl load ~/Library/LaunchAgents/com.llmrouter.plist

text

## OpenClaw Configuration

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

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.

Content

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

LaunchAgent not starting

Check logs and ensure paths are absolute:

bash
cat ~/Library/LaunchAgents/com.llmrouter.plist  # Verify paths
cat /path/to/llmrouter/logs/stderr.log  # Check for errors

Static analysis

No suspicious patterns detected.