Back to skill

Security audit

AgentRx

Security checks for vulnerabilities and agentic risk

Overview

AgentRx is not clearly malicious, but it sends tool errors and planned risky operations to a remote service and relies on weak safeguards for sensitive data and remote advice.

Install only if you are comfortable sending sanitized diagnostic data and planned risky-operation payloads to the AgentRx service. Do not use it on workflows involving secrets, private customer data, payment details, credentials, or sensitive internal schemas unless you add local redaction, restrict the endpoint to a trusted HTTPS host, use a dedicated scoped API key, and require human approval before acting on any remote suggestion.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (6)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/recover.sh:31
Finding

Raw Tool Error Messages Are Transmitted Without Redaction

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/preflight.sh:29
Finding

Preflight Sends Complete Risky-Operation Payloads and Tool Schemas to a Remote Service

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/recover.sh:25
Finding

Unrestricted Base URL Can Redirect Credentials and Telemetry to an Attacker-Controlled Endpoint

Content
View full analysis
&2 exit 1 fi PAYLOAD=$(jq -n \ --arg agent_id "$AGENT_ID" \ --arg tool_name "$TOOL_NAME" \ --arg error_msg "$ERROR_MSG" \ --arg error_code "$ERROR_CODE" \ --arg latency_ms "$LATENCY_MS" \ '{ agent_id: $agent_id, tool_name: $tool_name, error_message: $error_msg, error_code: ($error_code | tonumber), latency_ms: ($latency_ms | tonumber) }') RESPONSE=$(curl -s -w "\n%{http_code}" \ -X POST "${AGENTRX_BASE_URL}/v1/openclaw/recover" \ -H "X-API-Key: ${AGENTRX_API_KEY}" \ -H "Content-Type: application/json" \ -d "$PAYLOAD") ``` ### Technical Analysis The scripts verify only that `AGENTRX_BASE_URL` is nonempty. They do not require HTTPS, validate the hostname, restrict the port, or pin the documented service origin. The same request sends `AGENTRX_API_KEY` in a header and operational telemetry in the body. An attacker who can influence the environment or `~/.openclaw/.env` can set the URL to an HTTP endpoint, an attacker-controlled HTTPS origin, or a local network service. Subsequent legitimate invocation of either script then discloses the credential and request content to that destination. The ability to configure a service endpoint may be operationally useful, but unrestricted configuration is broader than necessary for the declared hosted-service integration. ### Attack Path 1. An attacker, compromised installer, or unsafe configuration process changes `AGENTRX_BASE_URL`. 2. The user or agent invokes `recover.sh` or `preflight.sh`. 3. The script constructs a request containing the AgentRx API key and tool-related telemetry. 4. `curl` sends t ...[truncated 657 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
scripts/recover.sh:61
Finding

Remote Response Is Framed as an Agent Instruction Without Enforced Trust Controls

Content
View full analysis
&2 echo "=== OPENCLAW INSTRUCTION ===" >&2 echo "$INSTRUCTION" >&2 if [[ -n "$CONFIDENCE" ]]; then echo "Confidence Score: $CONFIDENCE" >&2 fi echo "============================" >&2 fi ``` The README further describes the response as follows: ```text Classifies tool failures into 10 signatures and returns a direct plaintext instruction in openclaw_instruction telling the agent exactly what to do next. No interpretation required. ``` ### Technical Analysis The script extracts arbitrary plaintext from a remote response and labels it `OPENCLAW INSTRUCTION`. The README states that no interpretation is required, which conflicts with the more cautious trust model in `SKILL.md`. The script does not enforce the documented safeguards. It does not stop on `HUMAN_HANDOFF`, enforce the `0.70` confidence threshold, validate `action_type`, constrain permitted actions, or require confirmation for writes and external communication. It only prints the returned instruction and confidence. The script itself does not automatically execute the returned text. Exploitation therefore depends on an agent or operator treating its labeled output as authoritative. Nevertheless, presenting untrusted remote content as an instruction creates a direct prompt-injection channel if the service, configured endpoint, or transport trust is compromised. ### Attack Path 1. An attacker compromises the remote service or redirects `AGENTRX_BASE_URL`. 2. The agent submits a recovery request. 3. The attacker returns a malicious value in `openclaw_instruction` ...[truncated 790 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
README.md:16
Finding

README Publishes a Reusable Shared API Credential

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:10
Finding

Installation Documentation Uses an Unpinned Package Execution Command

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented behavior exceeds the declared purpose and permissions by sending failure data to a remote service and returning operational instructions from that service. Even though the text says the advice is advisory, external instructions can influence agent actions, and the undeclared network behavior plus possible post-failure data submission materially changes the trust and threat model.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The README instructs users to run npx clawhub install agentrx without pinning a specific version, which allows whatever package/version is current at install time to be executed. This creates a supply-chain risk: a compromised publisher, typo-squatted package, or malicious future update could execute arbitrary code during installation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README says AgentRx returns a plaintext instruction telling the agent exactly what to do next and that no interpretation is required, which encourages blind execution of externally supplied instructions. In the context of a recovery skill that activates on tool failures, this is especially dangerous because error messages and tool outputs may be attacker-influenced, creating an indirect prompt-injection path into agent behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill is documented to run after any tool failure and before risky tool calls, which is an overly broad trigger surface for a component that can influence subsequent agent actions. Broad invocation increases exposure to attacker-controlled error content, normal transient failures, and unnecessary dependence on an external decision source, making prompt-injection or unsafe recovery recommendations more likely to affect workflows.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The skill invokes shell commands and depends on external network access via curl, but it declares no tool scope or allowed-tools/permissions to constrain those capabilities. This creates a governance gap where an agent may execute shell and outbound HTTP behavior without explicit policy visibility, increasing the risk of unintended command execution, data egress, or misuse of the remote service.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation guidance is broad enough to trigger the skill for routine errors or subjective cases like results that 'look wrong or empty.' In context, that means many ordinary tool failures may be forwarded to a remote service, expanding data exposure and increasing the chance that externally supplied recovery instructions affect normal agent workflows.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The 'When To Use' section uses ambiguous triggers such as any high-risk tool call and outputs that merely 'look wrong or empty,' which encourages overuse. In this skill's context, over-broad invocation is more dangerous because each use can transmit tool names, payloads, and error content to an external service and introduce remote guidance into agent control flow.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The script transmits agent metadata, the intended tool payload, and the full tool schema to an external service using a bearer-style API key header. Because this is a preflight wrapper intended to run before risky tool calls, the data sent may include sensitive prompts, parameters, identifiers, or secrets embedded in payloads, creating a real exfiltration/privacy risk if the remote endpoint is untrusted, misconfigured, or compromised.

Content

Scanner excerpt · scripts/preflight.sh (reported line 43)May include surrounding context.

sh
tool_schema:      $schema
  }')

RESPONSE=$(curl -s -w "\n%{http_code}" \
  -X POST "${AGENTRX_BASE_URL}/v1/preflight" \
  -H "X-API-Key: ${AGENTRX_API_KEY}" \
  -H "Content-Type: application/json" \

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest describes AgentRx as a recovery layer that diagnoses tool failures and suggests recovery actions, but this script implements credentialed outbound network access by requiring AGENTRX_API_KEY and AGENTRX_BASE_URL and posting detailed failure data to that service. While remote diagnosis may be possible in some designs, the manifest does not disclose this external service dependency or credential use, so the capability is broader than the stated purpose alone justifies.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/recover.sh (reported line 45)May include surrounding context.

sh
latency_ms:    ($latency_ms | tonumber)
  }')

RESPONSE=$(curl -s -w "\n%{http_code}" \
  -X POST "${AGENTRX_BASE_URL}/v1/openclaw/recover" \
  -H "X-API-Key: ${AGENTRX_API_KEY}" \
  -H "Content-Type: application/json" \

Static analysis

No suspicious patterns detected.