Back to skill

Security audit

Infinity Router

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated routing purpose, but its installer can overwrite global commands and its broad automation touches sensitive AI-tool configuration.

Review before installing. Prefer pipx or a user-local bin directory, avoid running the installer as root, check for existing /usr/local/bin/infinity-router* commands, protect OpenRouter keys as secrets, and enable watch/webhook behavior only when you want automatic config changes and gateway restarts.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
pyproject.toml:1
Finding

Unpinned Dependencies Allow Mutable Supply-Chain Resolution

Content
View full analysis
=61", "wheel"] build-backend = "setuptools.build_meta" [project] name = "infinity-router" version = "2.1.0" description = "Unlimited free AI routing via OpenRouter" readme = "README.md" license = { text = "MIT" } requires-python = ">=3.10" dependencies = [ "requests>=2.31.0", ] ``` `install.sh:59-62`: ```bash # ── 3. Install package ──────────────────────────────────────────────────────── info "Installing infinity-router into venv…" "$VENV_DIR/bin/pip" install --quiet --upgrade pip "$VENV_DIR/bin/pip" install --quiet -e "$INSTALL_DIR" ``` ### Technical Analysis The project defines only lower bounds for `setuptools` and `requests`, leaves `wheel` entirely unconstrained, and does not provide a lockfile or package hashes. The installation script also upgrades `pip` automatically. Consequently, installation resolves mutable package versions from pip's configured package indexes at installation time. The exact installed code can therefore differ from the code reviewed during this audit. Python build-system dependencies are particularly sensitive because their code may execute while building or installing the package. This is not evidence that the currently named packages are malicious. The issue is that the installation process does not guarantee dependency identity or reproducibility. ### Attack Path 1. An attacker compromises a configured package index, dependency release, maintainer account, or package-distribution path. 2. The attacker publishes a version satisfying `setuptools>=61`, `requests>=2.31.0`, or the unconstrained `wheel` requirement. 3. A user runs `install.sh`. 4. Pip resolves and downloads the attacker-controlled version because no exact version or h ...[truncated 778 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Warning
Location
install.sh:67
Finding

Installer Unconditionally Replaces Existing Global Command Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (37)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A router skill that also performs uninstall and cleanup actions, including deleting symlinks and a local virtual environment, exceeds the expected behavioral scope. Even if intended for maintenance, undeclared destructive filesystem operations raise the risk of accidental removal of user data or breakage of adjacent tooling when invoked through automation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

A router skill that also performs uninstall and cleanup actions, including deleting symlinks and a local virtual environment, exceeds the expected behavioral scope. Even if intended for maintenance, undeclared destructive filesystem operations raise the risk of accidental removal of user data or breakage of adjacent tooling when invoked through automation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A router skill that also performs uninstall and cleanup actions, including deleting symlinks and a local virtual environment, exceeds the expected behavioral scope. Even if intended for maintenance, undeclared destructive filesystem operations raise the risk of accidental removal of user data or breakage of adjacent tooling when invoked through automation.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
To uninstall: `./uninstall.sh`

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

Run once a day or when models start failing:

bash
rm -f ~/.infinity-router/model-cache.json
infinity-router pick
openclaw gateway restart

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 134)May include surrounding context.

Run once a day or when models start failing:

bash
rm -f ~/.infinity-router/model-cache.json
infinity-router pick
openclaw gateway restart

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 146)May include surrounding context.

md
| `infinity-router: command not found` | Run `./install.sh` from the project directory |
| `OPENROUTER_API_KEY not set` | Get a free key at https://openrouter.ai/keys |
| Config not taking effect | `openclaw gateway restart`, then `/new` in Telegram |
| `Unknown model` errors in gateway log | Stale cache — `rm ~/.infinity-router/model-cache.json && infinity-router pick --validate` |
| Agent gives fake/hallucinated responses | Model doesn't support tools — run `infinity-router pick --validate` to get a real tool-capable model |
| All probes return `rate_limit` | Daily free quota exhausted — wait for UTC midnight reset, or add more API keys |
| `HTTP 429: free-models-per-day` | Add more keys comma-separated in `env.OPENROUTER_API_KEY`, or add separate profiles to `auth-profiles.json` |

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 · install.sh (reported line 74)May include surrounding context.

sh
[[ -f "$src" ]] || fail "Binary not found after install: $src"

    # Remove existing link/file
    [[ -e "$dst" || -L "$dst" ]] && rm -f "$dst"

    ln -s "$src" "$dst"
    ok "Linked $cmd → $dst"

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · README.md (reported line 339)May include surrounding context.

md
Supported targets
-----------------
openclaw     ~/.openclaw/openclaw.json   primary + fallback chain
claude-code  ~/.claude/settings.json    primary model only

Public API
----------

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · src/infinity_router/targets.py (reported line 9)May include surrounding context.

python
Supported targets
-----------------
openclaw     ~/.openclaw/openclaw.json   primary + fallback chain
claude-code  ~/.claude/settings.json    primary model only

Public API
----------

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · src/infinity_router/targets.py (reported line 189)May include surrounding context.

python
Supported targets
-----------------
openclaw     ~/.openclaw/openclaw.json   primary + fallback chain
claude-code  ~/.claude/settings.json    primary model only

Public API
----------

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

sh
echo "  State files were left intact:"
echo "    ~/.infinity-router/    (cache, rate-limits, daemon state)"
echo "  Remove manually if needed:"
echo "    rm -rf ~/.infinity-router"
echo ""

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

sh
echo "  State files were left intact:"
echo "    ~/.infinity-router/    (cache, rate-limits, daemon state)"
echo "  Remove manually if needed:"
echo "    rm -rf ~/.infinity-router"
echo ""

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly instructs users to place multiple OpenRouter API keys in environment/config files and in an auth-profiles.json example as plaintext, but it does not warn that these files are sensitive secrets that need filesystem protection and should not be committed or shared. In the context of an agent-routing tool, compromise of these keys enables unauthorized API usage, quota exhaustion, and possible billing or account abuse.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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 · README.md (reported line 299)May include surrounding context.

bash
# Quick background run
nohup infinity-router watch &> ~/.infinity-router/watch.log &

# Or as a systemd unit (recommended)
# Create ~/.config/systemd/user/infinity-router-watch.service

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

nohup infinity-router watch &> ~/.infinity-router/watch.log &

Or as a systemd unit (recommended)

Create ~/.config/systemd/user/infinity-router-watch.service

text

---

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documentation describes capabilities that require shell, network, file read/write, and environment access, but it declares no explicit tool scope or permissions boundary. This creates a transparency and governance problem: a user or orchestration layer cannot easily constrain what the skill may access, increasing the chance of over-privileged execution and unintended credential or filesystem exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation guidance uses broad phrases like free AI, OpenRouter, model switching, rate limits, or reducing AI costs, which are common topics and may cause the skill to trigger in conversations where users did not intend configuration changes. In this skill's context, over-broad activation is more dangerous because the documented actions include modifying config, reading auth-related files, and potentially restarting services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation directly instructs users to paste raw API keys into shell commands and JSON config files without strong warnings about secret handling, shell history, file permissions, or redaction. This can lead to credential leakage through terminal history, screenshots, logs, backups, or overly permissive files, and the risk is heightened because multiple keys are encouraged.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installer unconditionally removes any existing file or symlink at /usr/local/bin/ and replaces it with its own link, without prompting or verifying ownership. This can clobber unrelated binaries or prior installations and is especially risky because /usr/local/bin is a global executable path, affecting all users and workflows on the host.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes the skill as discovering, scoring, and configuring free OpenRouter models with fallback routing. This file also implements a watch command that tails gateway logs, detects failures, auto-rotates models, and can emit notifications, which is a materially broader operational behavior than simple model selection/configuration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The watch command accepts a --notify webhook URL, enabling outbound POST notifications that are not disclosed in the manifest. Undocumented network egress is risky because users may not realize operational data from logs or rotation events can be sent off-host to an arbitrary endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Automatic webhook notifications in watch mode can transmit operational metadata off-host without a strong user-facing warning at the point of configuration. In a routing/log-monitoring skill, that context makes the issue more sensitive because log-derived events may include model names, timing, failure patterns, and potentially other environment-specific details.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · src/infinity_router/probe.py (reported line 53)May include surrounding context.

python
payload = {**_PAYLOAD, "model": model_id}

    try:
        r = requests.post(CHAT_URL, headers=headers, json=payload, timeout=timeout)
        if r.status_code == 200:
            return True, None
        if r.status_code == 429:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a skill that routes requests across free OpenRouter models, but this code also modifies Claude Code's local model setting directly using arbitrary model IDs. The class docstring explicitly notes Claude Code uses Anthropic model IDs rather than OpenRouter IDs, which extends behavior beyond the stated OpenRouter-focused routing scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.