Back to skill

Security audit

Sudo Tool

Security checks for vulnerabilities and agentic risk

Overview

This skill openly provides broad root command execution, which fits its purpose but is too powerful and under-scoped for automatic agent use.

Install only if you specifically need an agent-facing sudo wrapper and can tightly constrain sudoers permissions. Do not let it run commands derived from web pages, documents, tool output, or other untrusted text without explicit human review.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:6
Finding

Unrestricted Elevated Command Execution

Content
View full analysis
``` ## Options - `-u user`: Run as specified user (default: root) - `-k`: Reset timestamp timeout - `-l`: List allowed commands ``` ### Technical Analysis The skill accepts an unrestricted command and executes it as root by default. It does not define a command allowlist, argument validation, privilege minimization, confirmation requirement, or restrictions against shell interpreters and metacharacters. The requirement for authorization through `/etc/sudoers` means the skill does not independently bypass authentication. However, once the invoking identity is authorized, the unrestricted interface can amplify malicious instructions, prompt injection, or operator mistakes into privileged system operations. An attacker able to influence the command supplied to this skill could attempt to execute destructive commands, invoke a shell, alter protected configuration, install software, or access root-readable information, subject to the permissions granted by the host's sudoers policy. ### Attack Path 1. An attacker places malicious instructions in task input or other untrusted content processed by the agent. 2. The agent interprets those instructions as requiring an administrative command. 3. The agent passes the attacker-influenced command to `sudo-tool`. 4. Because the default target identity is root, the command requests root execution. 5. If permitted by `/etc/sudoers`, the command accesses or modifies protected system resources. 6. The attacker obtains the effects of the granted elevated operation without any additional safeguard imposed by the skill. ### Impact Assessment Successful exploitation could ...[truncated 582 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly enables execution of commands with superuser privileges but does not include a prominent warning about the risks of privileged execution, such as system damage, privilege misuse, or executing untrusted input as root. In an agent setting, this omission increases the chance of unsafe use because users or downstream agents may treat the tool as routine rather than highly sensitive.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
91% confidence
Finding

This skill is a privileged-execution capability by design: it allows running arbitrary commands as root or another user. Even though the documentation notes sudoers authorization, the combination of broad command execution and elevation makes the skill inherently dangerous in an agent environment because any misuse, prompt injection, or unsafe parameter passing could lead to full system compromise or destructive administrative actions.

Content

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

md
name: sudo-tool
description: Execute commands with superuser privileges. Use for system administration tasks requiring elevated permissions.
---
# Sudo - Superuser Do

Execute commands with root or other user privileges. Requires proper authorization through /etc/sudoers configuration.