Back to skill

Security audit

3x-ui Node Manager

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned for remote 3x-ui administration, but it uses unsafe automation patterns that can expose credentials or change servers without strong trust checks.

Review before installing. Use this only on disposable or test servers unless you are comfortable with automated remote administration. Avoid passing passwords in chat or command arguments, do not store panel passwords in plaintext YAML, require HTTPS with valid certificates, verify SSH host keys, and replace the remote curl-to-bash installer with a pinned and verified source.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/xui_install.sh:39
Finding

Execution of a Mutable Remote Installer Without Integrity Verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/xui_install.sh:28
Finding

SSH Host Authentication Is Disabled

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/xui_batch.py:443
Finding

TLS Certificate Verification Is Disabled for Panel Administration

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/xui_install.sh:11
Finding

Sensitive Credentials Are Exposed Through Arguments, Output, Plaintext Configuration, and HTTP Fallback

Content
View full analysis
" exit 1 fi SSH_IP="$1" SSH_PORT="$2" SSH_USER="$3" SSH_PASS="$4" ``` The password is also passed as an argument to Expect: ```bash expect "$EXPECT_SCRIPT" "$SSH_IP" "$SSH_PORT" "$SSH_USER" "$SSH_PASS" 2>&1 | tee "$SPOOL" ``` When certificate setup fails, the installer deliberately converts the panel URL to HTTP: ```bash SSL_FAILED=$(echo "$CLEAN" | grep -i -c 'certificate setup failed\|Failed to issue' || true) if [ "$SSL_FAILED" -gt 0 ]; then ACCESS_URL=$(echo "$ACCESS_URL" | sed 's|^https://|http://|') echo " ⚠️ SSL 证书申请失败,面板使用 HTTP" fi ``` Panel credentials and the API token are printed to standard output: ```bash echo " ✅ 面板安装成功!" echo " ─────────────────────────────" echo " 📍 URL: $ACCESS_URL" echo " 👤 用户: $USERNAME" echo " 🔑 密码: $PASSWORD" echo " 🚪 端口: $PORT" echo " 📁 路径: $WEBPATH" [ -n "$API_TOKEN" ] && echo " 🎫 Token: $API_TOKEN" echo "" echo "--- JSON ---" echo "{\"access_url\":\"$ACCESS_URL\",\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\",\"port\":\"$PORT\",\"webpath\":\"$WEBPATH\",\"api_token\":\"$API_TOKEN\"}" echo "--- END ---" ``` SOCKS5 credentials are likewise accepted through a command-line option: ```python ap.add_argument("--server", required=True, help="Target server name or all") ap.add_argument("--socks5", required=True, help="SOCKS5 exit (ip:port:user:pass)") ``` The Skill instructs users to store reusable panel credentials in plaintext YAML: ```yaml servers: - name: server-1 url: http://:/ username: password: ``` ### T ...[truncated 2947 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:1
Finding

Python Dependencies Are Unpinned and Installed Without Integrity Hashes

Content
View full analysis
=6.0 requests>=2.28 qrcode>=7.4 cryptography>=41.0 ``` The documented installation command is: ```bash pip install -r scripts/requirements.txt ``` ### Technical Analysis Every dependency uses an open-ended minimum version constraint. A future package release satisfying the constraint may therefore be installed without any change to the audited Skill. No lock file or package hashes are supplied, and transitive dependency versions are also unconstrained. This prevents reproducible installation and allows the effective dependency code to change after review. If an upstream package account, release process, or configured package index is compromised, a malicious future version can be selected automatically. The listed package names correspond to established packages; the audit found no evidence of typosquatting or an intentionally malicious dependency. The risk arises from mutable resolution and lack of integrity verification. ### Attack Path 1. An upstream package release, maintainer account, or configured Python package index is compromised. 2. A malicious version greater than or equal to the specified minimum is published. 3. A user follows the documented `pip install -r scripts/requirements.txt` command. 4. Pip resolves the malicious version because it satisfies the open-ended constraint. 5. Malicious package installation hooks or imported runtime code execute on the Skill host. 6. That code can access the same local files, configuration, panel credentials, and network privileges available to the Skill process. ### Impact Assessment Exploitation can provide arbitrary code execution with the privileges of the user running `pip` or the Skill. If installation is perform ...[truncated 376 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The workflow explicitly instructs execution of a remote installer fetched via curl on a server, yet this high-risk behavior is not transparently declared in the skill summary. Undeclared remote code execution on infrastructure is dangerous because users may provide credentials expecting simple panel management while the skill actually installs software from a live third-party source.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The workflow explicitly instructs execution of a remote installer fetched via curl on a server, yet this high-risk behavior is not transparently declared in the skill summary. Undeclared remote code execution on infrastructure is dangerous because users may provide credentials expecting simple panel management while the skill actually installs software from a live third-party source.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill omits a clear upfront warning that it will SSH into servers and execute a remote install script fetched over the network. Given the infrastructure-management context, that omission is especially dangerous because users may unknowingly authorize privileged remote code execution on production or rented servers.

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

md
pip install -r scripts/requirements.txt

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Setting session.verify = False causes all authenticated requests to panel endpoints to skip server certificate validation while the script transmits usernames, passwords, retrieves keys, edits Xray settings, and restarts services. An attacker positioned on the network or controlling DNS/proxy infrastructure could impersonate a panel, steal credentials, return malicious configuration data, or alter the deployed node settings.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly promotes fully automated SSH login, panel installation, and credential handling, but it does not prominently warn that users will be supplying and storing highly sensitive server and panel credentials in plaintext-like workflows. In an AI-driven skill, this increases the chance that credentials are exposed in chat history, local config files, logs, or accidental reuse without the user's informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README normalizes automatic remote installation and node creation but does not clearly warn that the skill can make disruptive system changes, including installing 3x-ui, modifying Xray configuration, adding routes, and restarting services. In this context, users may trigger impactful changes through casual natural-language requests without understanding downtime or configuration risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill invokes shell and network-capable operations but declares no tool scope or permission boundaries. In this context, that means an agent could be induced to run SSH commands, fetch remote code, or modify local files without explicit capability restriction, increasing the risk of unintended remote administration and secret handling.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Broad activation phrases like requests related to 'install panel, create node, 3x-ui' can cause accidental invocation in contexts where the user did not intend remote admin actions. Because this skill can handle credentials, edit files, and potentially perform server-side installation, ambiguous triggering materially increases the chance of unsafe execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instructions direct storing panel URLs, usernames, and passwords in a local YAML file without warning about plaintext secret storage, access control, or lifecycle management. In a skill that manages remote panels, such credentials could be exposed through local compromise, backups, logs, or accidental sharing, leading to unauthorized panel access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script globally disables urllib3 TLS warnings and later disables certificate verification on requests sessions, which suppresses indicators of man-in-the-middle risk. In this skill's context, the tool logs into remote admin panels and pushes configuration changes, so insecure TLS handling directly exposes panel credentials and administrative actions to interception or tampering.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/xui_batch.py (reported line 76)May include surrounding context.

python
xray_bin = find_xray_bin()
    if xray_bin:
        try:
            out = subprocess.run([xray_bin, "x25519"], capture_output=True, text=True, timeout=10)
            priv = re.search(r'PrivateKey:\s*(\S+)', out.stdout).group(1)
            pub = re.search(r'PublicKey\):\s*(\S+)', out.stdout).group(1)
            return priv, pub

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
98% confidence
Finding

The insecure default of disabling certificate verification is especially dangerous because this script is an administrative automation tool that operates over remote sessions and changes proxy/routing behavior on multiple servers. The skill context increases risk: one unsafe default can compromise several panels at once, leak credentials, and result in unauthorized network redirection or service disruption.

Content

Scanner excerpt · scripts/xui_batch.py (reported line 451)May include surrounding context.

python
for panel in panels:
        print(f"\n── {panel['name']} ──")
        s = requests.Session()
        s.verify = False
        if proxies:
            s.proxies = proxies

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script disables SSH host key verification (StrictHostKeyChecking=no) and auto-accepts connection and installation prompts, removing critical trust and review checkpoints. This makes man-in-the-middle attacks, connection to the wrong host, and unsafe default installation choices far more likely, especially because the skill is designed to log into remote servers noninteractively with passwords.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script remotely executes an installer fetched at runtime from GitHub over SSH using bash <(curl ...), which gives the remote content full shell execution on the target server without integrity verification, version pinning, or user confirmation. In this skill’s context—automated installation on arbitrary servers via provided SSH credentials—this significantly increases supply-chain and remote-code-execution risk if the upstream script is compromised, changed unexpectedly, or intercepted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

Several workflow and safety lines are written in Chinese while the rest of the document is in English, and the skill does not state that it is intended for a Chinese-speaking audience or offer language selection. This can impose a locale/language assumption on users and operators without opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with only a lower bound (pyyaml>=6.0), which allows builds to resolve to different versions over time and makes the installed package set non-reproducible. In a skill that provisions servers and networking software, this increases supply-chain risk and makes it impossible to verify whether a safe version is consistently installed.

Content

Scanner excerpt · scripts/requirements.txt (reported line 1)May include surrounding context.

text
pyyaml>=6.0
requests>=2.28
qrcode>=7.4
cryptography>=41.0

Unverifiable Dependency: pyyaml has 8 known advisory(ies) (CVE-2019-20477 (Deserialization of Untrusted Data in PyYAML); CVE-2020-1747 (Improper Input Validation in PyYAML); CVE-2020-14343 (Improper Input Validation in PyYAML) +5 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
93% confidence
Finding

PyYAML has known historical advisories, and because the manifest does not pin a version, there is no way to confirm that installations avoid affected releases. If the skill parses YAML from user-controlled or remote sources, a vulnerable resolver could enable unsafe parsing behaviors or input-validation issues.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

requests>=2.28 is unpinned, so future installations may pull different releases with different security characteristics. Because this skill appears to interact with remote servers over SSH and likely performs network operations, uncontrolled dependency resolution raises supply-chain and patch-verification concerns.

Content

Scanner excerpt · scripts/requirements.txt (reported line 2)May include surrounding context.

text
pyyaml>=6.0
requests>=2.28
qrcode>=7.4
cryptography>=41.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
94% confidence
Finding

Requests has multiple known advisories, and without exact version pinning the project cannot demonstrate that deployed environments avoid affected versions. In a server-management skill that likely makes outbound network requests and may handle credentials, an affected HTTP client could leak secrets or mishandle TLS/session behavior.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

qrcode>=7.4 is not version-pinned, which weakens build reproducibility and makes dependency auditing harder. While this package is less security-sensitive than transport or crypto libraries, leaving it floating still exposes the project to unexpected upstream changes or compromised releases.

Content

Scanner excerpt · scripts/requirements.txt (reported line 3)May include surrounding context.

text
pyyaml>=6.0
requests>=2.28
qrcode>=7.4
cryptography>=41.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

cryptography>=41.0 is unpinned despite being a high-sensitivity security library. Allowing arbitrary newer versions without review can introduce incompatible crypto behavior, vulnerable transitive components, or compromised package releases, which is more concerning in a tool that configures secure proxying and server access.

Content

Scanner excerpt · scripts/requirements.txt (reported line 4)May include surrounding context.

text
pyyaml>=6.0
requests>=2.28
qrcode>=7.4
cryptography>=41.0

Unverifiable Dependency: cryptography has 16 known advisory(ies) (GHSA-39hc-v87j-747x (Vulnerable OpenSSL included in cryptography wheels); CVE-2023-50782 (Python Cryptography package vulnerable to Bleichenbacher timing oracle attack); GHSA-537c-gmf6-5ccf (Vulnerable OpenSSL included in cryptography wheels) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Cryptography has numerous advisories, including issues related to bundled OpenSSL and cryptographic side channels; without pinning, the installed version may be vulnerable and cannot be verified. Given this skill's context of managing panels, nodes, and secure connectivity, weaknesses in a crypto library are more operationally significant than in a generic utility.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script's comments and runtime messages are written in Chinese only, including usage and status output. This imposes a language choice on users without offering an opt-in, fallback, or documenting that the skill is intentionally limited to a Chinese-speaking audience.

Content

No source excerpt is available for this finding.