Back to skill

Security audit

minecraft-server-admin

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for Minecraft server administration, but it needs Review because it grants broad live-server control with weak guardrails and an unnecessary unpinned install dependency.

Install only for Minecraft servers you control. Keep RCON bound to localhost or use a trusted tunnel/VPN, use a dedicated strong password, and do not let an agent run destructive commands without explicit review. Consider removing or pinning the unused npm dependency and enable MC_SERVER_LOG only if you are comfortable exposing recent server logs to the agent.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/rcon.js:158
Finding
Destructive RCON Commands Execute Without Enforced Confirmation or Authorization<![CDATA[ ## Vulnerability Details **File Location**: `scripts/rcon.js:158-176` **Vulnerability Type**: Missing authorization and safety enforcement for privileged commands **Risk Level**: High ### Vulnerable Code ```javascript if (require.main === module) { const args = process.argv.slice(2); if (args.length === 0) { console.log('Usage: node rcon.js "<command>"'); console.log('Examples:'); console.log(' node rcon.js "list"'); console.log(' node rcon.js "ban PlayerX griefing"'); console.log(' node rcon.js "give Steve minecraft:diamond 64"'); console.log('\nEnvironment variables:'); console.log(' MC_RCON_HOST (default: localhost)'); console.log(' MC_RCON_PORT (default: 25575)'); console.log(' MC_RCON_PASSWORD (required)'); console.log('\nTesting current RCON connection...'); testConnection().then(r => { if (r.ok) { console.log(`OK connection healthy (latency ${r.latency}ms)`); console.log(` ${r.listOutput}`); } else { console.error(`Connection failed: ${r.error}`); process.exit(1); } }); return; } const command = args.join(' '); rconExec(command) .then(result => { console.log(result); process.exit(0); }) .catch(err => { console.error(err.message); process.exit(1); }); } ``` ### Technical Analysis The command-line interface concatenates all supplied arguments and passes the result directly to `rconExec`. There is no command allowlist, argument validation, caller authorization, destructive-command detection, or confirmation-token verification. This behavior contradicts the mandatory confirmation protocol documented in `SKILL.md:132-151`. The documentation requires confirmation for operations such as `ban`, `ban-ip`, `op`, `fill`, `kill @e`, `stop`, and `save-off`, but the executable implementation does not enforce that policy. The exported `rconExec` and `rconMulti` functions also expose un ...[truncated 1498 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Implement a deny-by-default command policy in executable code rather than relying on Agent instructions. 2. Separate read-only operations, routine administrative operations, and destructive operations into distinct APIs. 3. Require a short-lived, single-use confirmation token for dangerous commands such as: - `ban` and `ban-ip` - `op` - `fill` - mass-targeted `kill` - `stop` - `save-off` - whitelist-disabling operations 4. Validate the command name and every argument against strict schemas. Do not accept arbitrary command strings where structured parameters can be used. 5. Reject command chaining, control characters, unexpected newlines, and commands not explicitly supported by the Skill. 6. Bind confirmation tokens to the exact normalized command, target server, requesting identity, and expiration time. 7. Enforce caller authorization separately from confirmation so confirmation alone cannot grant access to an unauthorized user. 8. Record immutable audit events containing the authenticated caller, normalized command, target server, confirmation identifier, timestamp, and result. 9. Use a lower-privileged server-side account or command gateway where possible instead of exposing unrestricted console authority. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/rcon.js:23
Finding
RCON Credentials and Administrative Commands Are Transmitted Over Unencrypted TCP<![CDATA[ ## Vulnerability Details **File Location**: `scripts/rcon.js:23-28, 72-84` **Vulnerability Type**: Plaintext transmission of sensitive authentication data **Risk Level**: High ### Vulnerable Code ```javascript const net = require('net'); const RCON = { host: process.env.MC_RCON_HOST || 'localhost', port: parseInt(process.env.MC_RCON_PORT) || 25575, password: process.env.MC_RCON_PASSWORD || '', timeout: parseInt(process.env.MC_RCON_TIMEOUT) || 5000, }; ``` ```javascript const socket = new net.Socket(); let buffer = Buffer.alloc(0); let authenticated = false; let responsePayload = ''; const reqId = Math.floor(Math.random() * 0x7fffff) + 1; socket.connect(cfg.port, cfg.host, () => { socket.write(encodePacket(reqId, TYPE.AUTH, cfg.password)); }); ``` ### Technical Analysis The implementation establishes a raw TCP connection through Node.js `net.Socket` and sends the RCON authentication packet directly over that connection. It does not provide TLS encryption, certificate validation, server identity verification, or enforced tunneling. The authentication payload contains the RCON password, and later packets contain administrative commands and responses. Native Minecraft RCON does not protect this traffic with transport encryption. Although the default host is `localhost`, the `MC_RCON_HOST` environment variable permits arbitrary remote hosts, and the code does not warn about or reject insecure remote connections. Consequently, using this client across an untrusted or shared network exposes both credentials and privileged server-management traffic to passive interception and active manipulation. ### Attack Path 1. An administrator configures `MC_RCON_HOST` with a remote server address. 2. The client opens a plaintext TCP connection to the configured RCON port. 3. An attacker with visibility into the network path captures the authentication packet. 4. The attacker recovers the RCON password from the unencrypted payload. 5. The attacker c ...[truncated 960 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict RCON to loopback by default and configure the Minecraft server so the RCON port is not publicly reachable. 2. Reject non-loopback `MC_RCON_HOST` values unless an explicit secure-transport mode has been configured. 3. For remote administration, carry RCON traffic through an authenticated and encrypted channel such as: - An SSH tunnel - A private VPN - A mutually authenticated TLS proxy 4. If a TLS proxy is supported directly by the client, validate the server certificate and hostname and avoid configurations that disable certificate verification. 5. Add a prominent runtime warning or hard failure when a remote host is used without an approved secure tunnel. 6. Apply firewall rules that permit access only from explicitly authorized management systems. 7. Rotate the RCON password after any suspected plaintext exposure and use a strong, unique credential. 8. Document clearly that native RCON traffic is plaintext and must not be sent directly across untrusted networks. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:15
Finding
Unused Third-Party Package Is Installed Without Version Pinning<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:15-19` **Vulnerability Type**: Unnecessary and unpinned supply-chain dependency **Risk Level**: Medium ### Vulnerable Code ```yaml install: - id: rcon-dep kind: node package: rcon-client label: "rcon-client — Minecraft RCON protocol" ``` ### Technical Analysis The Skill metadata instructs the environment to install the `rcon-client` npm package without specifying an exact version. However, the reviewed scripts do not import this package. `scripts/rcon.js` implements the RCON protocol using Node.js built-in modules, while `scripts/log-analyzer.js` also relies only on built-in modules. The installation therefore adds supply-chain exposure without providing functionality used by the project. Because no version is pinned, installation behavior can change as new package or transitive dependency releases are published. npm packages may also execute lifecycle scripts during installation, meaning package code can run before the Skill itself is used. No evidence was found that the named package is currently malicious. The vulnerability is the unnecessary, mutable dependency installation and the resulting avoidable trust boundary. ### Attack Path 1. A user installs or activates the Skill. 2. The installation system resolves `rcon-client` without an exact version constraint. 3. A compromised or unexpectedly changed package release, transitive dependency, or lifecycle script is retrieved. 4. Package-controlled installation code executes with the privileges of the installation process. 5. The compromised dependency can access files, environment variables, or network resources available to that process, even though the Skill does not require the package at runtime. ### Impact Assessment The obtainable privileges depend on the account that performs package installation. Potential impact includes: - Execution of arbitrary code as the installing user. - Access to files and environment vari ...[truncated 317 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `rcon-client` installation entry because the current implementation does not use it. 2. If the package becomes necessary, pin an exact reviewed version rather than resolving an unspecified release. 3. Commit and verify a lockfile containing integrity hashes for the complete dependency graph. 4. Review the package's maintainers, publication history, transitive dependencies, and lifecycle scripts before adoption. 5. Disable npm lifecycle scripts during installation where operationally possible. 6. Run dependency installation with minimal filesystem and network privileges in an isolated environment. 7. Use automated dependency scanning and controlled update review instead of automatically accepting newly published versions. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The manifest frames the skill as in-game RCON administration, but the documented behavior also includes direct local filesystem log access and offline analysis. That mismatch is dangerous because reviewers and users may authorize the skill expecting only console commands, while it can also read potentially sensitive server logs containing chat, IPs, usernames, commands, and activity history.

Ae1

High
Category
analysis-evasion
Content
For any player-related command, use: `scripts/rcon.js "<command>"`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
For any player-related command, use: `scripts/rcon.js "<command>"`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- `scripts/log-analyzer.js` — Log parsing utilities
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Description-Behavior Mismatch

High
Confidence
96% confidence
Finding
The reference includes maintenance and lifecycle commands such as /save-off, /stop, and /reload even though the skill description explicitly says it does not handle full server lifecycle or related operational workflows. This broadens the effective capability of the skill beyond its declared scope and can enable service disruption, unsafe save-state changes, or other administrative actions an agent or user may invoke unintentionally.

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
Documenting /stop exposes an immediate server shutdown capability that is not necessary for routine in-game administration and directly conflicts with the stated scope of the skill. In an agent context, this increases the risk of accidental or malicious denial of service because the command is simple, destructive to availability, and likely to be treated as a valid supported action.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill declares capabilities that use environment variables and network access but does not explicitly scope or constrain those tools in the manifest. This weakens policy enforcement and reviewability, making it easier for a skill with privileged credentials like an RCON password to overreach or be repurposed without clear guardrails.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill documentation says it is limited to in-game RCON administration, yet it instructs reading a server log file from the filesystem via MC_SERVER_LOG. This creates a scope expansion from remote command execution into local file access, which can expose sensitive operational and player data beyond what the user may expect.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The performance-monitoring workflow depends on reading local logs directly rather than staying within the stated RCON-only administration boundary. This broadens the skill's accessible data surface and may disclose historical activity or operational details not necessary for the core admin function.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The log analysis section explicitly directs shell-style tailing of a file, which exceeds the manifest's stated RCON-only scope and introduces filesystem access behavior. Because server logs can contain sensitive events and identifiers, this undocumented expansion increases privacy and data-exposure risk.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
This code is a command runner for Minecraft RCON and the header examples include impactful administrative actions such as banning a player and issuing game items. Although the file documents usage and required environment variables, it does not include any user-facing warning that commands are executed directly against a live server and may be destructive or irreversible.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:53