Back to skill

Security audit

printer-hostage-rescue

Security checks for vulnerabilities and agentic risk

Overview

This printer repair skill needs review because it recommends clearing entire print queues and changing device settings without adequate safeguards against losing jobs or configuration.

Use diagnostics first and inspect pending jobs before enabling repairs. Require approval before clearing queues, restarting printing services, changing firmware, or resetting saved settings. Prefer canceling only the affected job, confirm the network being scanned, and use vendor procedures for the exact printer model with settings backed up.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (11)

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/print_rescue.py (reported line 96)May include surrounding context.

python
else:
        print("No CUPS lpstat. Windows: net stop spooler && del /Q "
              "%SYSTEMROOT%\\System32\\spool\\PRINTERS\\*.* && net start spooler")
        print("macOS: cancel -a - ; sudo launchctl kickstart -k system/org.cups.cupsd")


def probe(ip, port, timeout=0.6):

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Firmware downgrade and NVRAM reset fixes lack warnings about device integrity and configuration loss.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The skill recommends firmware downgrades and model-specific NVRAM resets without warning that older firmware may restore patched vulnerabilities or that resets may erase network and security configuration. Although these operations can be legitimate troubleshooting measures, the escalation workflow could lead an agent to perform disruptive changes without informed approval, potentially disabling the printer or leaving it less secure.

Content

No source excerpt is available for this finding.

Spooler repair instructions clear pending print jobs without warning users about job loss.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The repair instructions delete spool files or cancel queued jobs without warning about job loss or requiring confirmation. Although queue clearing is a legitimate printer troubleshooting step, these broad operations can discard unrelated users' pending jobs and disrupt shared printing rather than just resolve the reported stuck job.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/rescue-guide.md (reported line 43)May include surrounding context.

md
## 4. Spooler surgery
- Windows: `net stop spooler & del /Q %SYSTEMROOT%\System32\spool\PRINTERS\*.* &
  net start spooler`
- macOS: `cancel -a -` then restart `cupsd` (`sudo launchctl kickstart -k system/org.cups.cupsd`)
- Linux/CUPS: Web UI http://localhost:631 → Jobs → Cancel All; `cancel -a`;
  stuck jobs in /var/spool/cups.

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/print_rescue.py (reported line 83)May include surrounding context.

python
def cmd_spooler(args):
    import shutil
    if shutil.which("lpstat"):
        r = subprocess.run(["lpstat", "-W", "all", "-o"], capture_output=True, text=True)
        jobs = [l for l in (r.stdout or "").splitlines() if l.strip()]
        print(f"CUPS jobs: {len(jobs)}")
        for j in jobs[:10]:

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/print_rescue.py (reported line 89)May include surrounding context.

python
for j in jobs[:10]:
            print("  " + j)
        if args.fix and jobs:
            subprocess.run(["cancel", "-a"], capture_output=True)
            print("→ cancel -a sent; remaining:")
            r2 = subprocess.run(["lpstat", "-o"], capture_output=True, text=True)
            print(r2.stdout or "  (none — queue clear)")

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/print_rescue.py (reported line 91)May include surrounding context.

python
if args.fix and jobs:
            subprocess.run(["cancel", "-a"], capture_output=True)
            print("→ cancel -a sent; remaining:")
            r2 = subprocess.run(["lpstat", "-o"], capture_output=True, text=True)
            print(r2.stdout or "  (none — queue clear)")
    else:
        print("No CUPS lpstat. Windows: net stop spooler && del /Q "

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/print_rescue.py (reported line 96)May include surrounding context.

python
else:
        print("No CUPS lpstat. Windows: net stop spooler && del /Q "
              "%SYSTEMROOT%\\System32\\spool\\PRINTERS\\*.* && net start spooler")
        print("macOS: cancel -a - ; sudo launchctl kickstart -k system/org.cups.cupsd")


def probe(ip, port, timeout=0.6):

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · scripts/print_rescue.py (reported line 99)May include surrounding context.

python
print("macOS: cancel -a - ; sudo launchctl kickstart -k system/org.cups.cupsd")


def probe(ip, port, timeout=0.6):
    try:
        with socket.create_connection((ip, port), timeout=timeout):
            return True

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/print_rescue.py (reported line 112)May include surrounding context.

python
import shutil
    if not shutil.which("avahi-browse"):
        return []
    r = subprocess.run(["avahi-browse", "-rt", "_ipp._tcp"], capture_output=True,
                       text=True, timeout=8)
    found = []
    for line in (r.stdout or "").splitlines():

Static analysis

No suspicious patterns detected.