Back to skill

Security audit

RFC Document Assistant

Security checks for vulnerabilities and agentic risk

Overview

The skill is a legitimate RFC lookup helper, but its installation guide includes a high-risk remote installer path that can execute mutable code before review or verification.

Install only if you are comfortable trusting the x-cmd framework. Prefer `brew install x-cmd` or a download-review-execute flow, avoid the `curl | sh` option on machines with credentials or sensitive files, and confirm any agent installation step explicitly before proceeding.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
data/install.md:104
Finding
Unpinned Remote Installation Script Executed Directly by Shell## Vulnerability Details **File Location**: `data/install.md`, lines 25 and 104 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical The installation metadata and user-facing instructions both provide a command that downloads a mutable remote response and immediately executes it: ```yaml - name: install-script-auto command: "curl -fsSL https://get.x-cmd.com | sh" verification: checksum risk_level: high recommendation: "avoid in sensitive environments" requires_review: false warning: "Executes remote code without manual review" ``` ```bash curl -fsSL https://get.x-cmd.com | sh ``` ### Technical Analysis The response from `https://get.x-cmd.com` is passed directly to `sh` without first pinning a release, verifying the initial script against a trusted digest or signature, or giving the user an opportunity to inspect the exact payload being executed. The effective installer can therefore change after this Skill has been reviewed. Although the document warns users about the danger and states that downloaded binaries receive checksum verification, it also acknowledges that this verification occurs only after the initial installation script has started. A malicious bootstrap script would consequently execute before downstream integrity checks could provide protection. Installation of the complete x-cmd framework also exceeds the narrow functionality required to query RFC documents. The framework's loader is later sourced into the current shell using `. ~/.x-cmd.root/X`, extending trust in the remotely installed content to future Skill invocations. No administrative privilege is requested, but arbitrary execution under the current user account is still broader than the minimum access required for RFC retrieval. ### Attack Path 1. A user invokes the Skill to search for or read an RFC. 2. The required x-cmd framework is not present. 3. The user or agent follows the doc ...[truncated 1621 chars]
Remediation
## Remediation Suggestions 1. Remove the `curl -fsSL https://get.x-cmd.com | sh` command from both installation metadata and user-facing instructions. 2. Prefer a version-pinned package distributed through a maintained package repository with cryptographic integrity verification. 3. If an installation script is unavoidable: - Download a fixed-version artifact without executing it. - Publish an expected SHA-256 digest or signature through a separately trusted channel. - Verify the artifact before any part of it is executed. - Require manual inspection and explicit approval. - Execute it only after successful verification. 4. Do not characterize downstream binary checksums as verification of the initial bootstrap script; verify the bootstrap independently. 5. Require explicit user authorization before installing software, modifying shell configuration, or sourcing newly installed code. 6. Prefer a narrowly scoped, auditable RFC client instead of installing and sourcing the broader x-cmd framework. 7. Pin installer and package versions so the reviewed artifact cannot silently change after audit. 8. In automated environments, use an isolated account or disposable container without secrets and restrict network, filesystem, and environment access during installation.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

External Script Fetching

High
Category
Supply Chain
Content
recommendation: "acceptable with review"
      requires_review: true
    - name: install-script-auto
      command: "curl -fsSL https://get.x-cmd.com | sh"
      verification: checksum
      risk_level: high
      recommendation: "avoid in sensitive environments"
Confidence
98% confidence
Finding
The document includes a direct `curl | sh` remote execution command, which is inherently dangerous because it executes code fetched over the network before the user can inspect it. Even though the file labels this path as high risk and warns against sensitive use, the capability still creates real supply-chain compromise risk if the remote host or delivery path is tampered with.

External Script Fetching

High
Category
Supply Chain
Content
```bash
# 1. Download install script
curl -fsSL https://get.x-cmd.com > /tmp/x-cmd-install.sh

# 2. REVIEW the script content (critical step)
cat /tmp/x-cmd-install.sh
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Chaining Abuse

High
Category
Tool Misuse
Content
**⚠️ WARNING:** This executes remote code without manual review.

```bash
curl -fsSL https://get.x-cmd.com | sh
```

**Only use when:**
Confidence
99% confidence
Finding
The `| sh` construct chains network retrieval directly into shell execution, preventing pre-execution inspection and amplifying the impact of any compromise of the remote source. In an agent skill context, this is especially dangerous because users or automation may copy or invoke the exact command without understanding that checksum verification happens only after initial code execution.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
x-cmd is entirely contained in `~/.x-cmd.root/`. To remove:

```bash
rm -rf ~/.x-cmd.root/
# Also remove from shell config (~/.bashrc, ~/.zshrc):
# [ ! -f "$HOME/.x-cmd.root/X" ] || . "$HOME/.x-cmd.root/X"
```
Confidence
90% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
x-cmd is entirely contained in `~/.x-cmd.root/`. To remove:

```bash
rm -rf ~/.x-cmd.root/
# Also remove from shell config (~/.bashrc, ~/.zshrc):
# [ ! -f "$HOME/.x-cmd.root/X" ] || . "$HOME/.x-cmd.root/X"
```
Confidence
90% 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).

Vague Triggers

Medium
Confidence
90% confidence
Finding
The trigger description is broad enough to match many generic Internet protocol or standards-related questions, which can cause this skill to activate when the user's intent is only loosely related to RFC lookup. That can lead to unintended tool routing, unnecessary external lookups, or AI summaries being used in place of direct answers, reducing reliability and potentially exposing user queries to additional processing paths.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
1. Creates `~/.x-cmd.root/` directory (user-local)
2. Downloads x-cmd core files from GitHub releases
3. Verifies SHA256 checksums of all downloaded files
4. No system modifications, no sudo required

---
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Static analysis

No suspicious patterns detected.