Back to skill

Security audit

Brother DCP-T426W Printer

Security checks for vulnerabilities and agentic risk

Overview

The printer skill is mostly coherent, but the package also includes an unrelated Sonos control skill that installs a mutable external Go CLI, which users should review before installing.

Review the bundled sonoscli directory before installing. The Brother printer functionality is disclosed and mostly purpose-aligned, but privileged CUPS setup should only be run on the intended host after confirming the printer URI, and print commands will send real output to the configured printer. Treat the unrelated Sonos skill and its @latest installer as the main reason this package needs Review.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
skills/sonoscli/SKILL.md:5
Finding

Unpinned Third-Party CLI Dependency Installed from a Mutable Upstream Source

Content
View full analysis

Vulnerability Details

File Location: skills/sonoscli/SKILL.md:5
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable code:

yaml
metadata: {"clawdbot":{"emoji":"🔊","requires":{"bins":["sonos"]},"install":[{"id":"go","kind":"go","module":"github.com/steipete/sonoscli/cmd/sonos@latest","bins":["sonos"],"label":"Install sonoscli (go)"}]}}

Technical Analysis

The installation metadata directs the Skill framework to install github.com/steipete/sonoscli/cmd/sonos@latest. The @latest selector is mutable and does not identify a specific reviewed release or source revision. Consequently, the dependency retrieved during installation may differ from the version that existed when this package was audited.

Installing a Go command can retrieve source code and transitive modules from external infrastructure before compiling an executable. Because neither an immutable version nor an expected artifact checksum is declared here, this project cannot independently guarantee the identity or integrity of the code ultimately installed.

The Sonos component is also unrelated to the top-level Brother printer functionality, increasing the package's supply-chain exposure without contributing to its declared primary purpose. The available evidence does not establish that the current upstream project is malicious; the vulnerability is the unsafe, mutable dependency resolution mechanism.

Attack Path

  1. An attacker compromises the upstream Sonos CLI repository, its release process, or a relevant dependency.
  2. The compromised source becomes the version resolved by github.com/steipete/sonoscli/cmd/sonos@latest.
  3. A user or Agent installs the bundled Sonos Skill.
  4. The installation process downloads and compiles the changed upstream source and its transitive dependencies.
  5. The resulting sonos executable is placed in the user's executable path.
  6. When the user or Agent invokes `so ...[truncated 846 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the unrelated skills/sonoscli component from the printer Skill package if Sonos control is not required.
  2. If the component is required, replace @latest with a specific, reviewed semantic version or immutable commit:
    yaml
    "module":"github.com/steipete/sonoscli/cmd/sonos@vX.Y.Z"
    
  3. Verify the pinned module and all transitive dependencies using Go module checksums and retain the reviewed go.sum or equivalent integrity records where supported.
  4. Use a trusted internal mirror or publish a verified, checksummed artifact rather than resolving mutable upstream source at installation time.
  5. Document that installation performs an external network fetch and require explicit user approval before downloading or executing the dependency.
  6. Add automated dependency review, vulnerability scanning, and controlled version-update procedures. Each update should be reviewed before changing the pinned version.
  7. Perform installation and execution without administrative privileges and restrict the process's filesystem, environment-variable, and network access to the minimum needed for Sonos operation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (23)

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 · SKILL.md (reported line 131)May include surrounding context.

md
| Feature | IPP + driverless | TCP Direct |
|---------|-----------------|------------|
| Setup | CUPS + `driverless` | None |
| sudo required | Setup only (once) | No |
| Text printing | Yes | Yes |
| Image printing | Yes (PWG-raster) | No (raw bytes only) |
| PDF printing | Yes | No |

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 · CLAUDE.md (reported line 68)May include surrounding context.

bash
# Install CUPS + driverless
sudo apt install cups cups-filters ipp-usb
sudo systemctl enable --now cups

# Generate PPD and add printer

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 · CLAUDE.md (reported line 69)May include surrounding context.

bash
# Install CUPS + driverless
sudo apt install cups cups-filters ipp-usb
sudo systemctl enable --now cups

# Generate PPD and add printer

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · CLAUDE.md (reported line 69)May include surrounding context.

bash
# Install CUPS + driverless
sudo apt install cups cups-filters ipp-usb
sudo systemctl enable --now cups

# Generate PPD and add printer
driverless "ipp://192.168.50.232:631/ipp/print" > ~/brother.ppd

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill clearly instructs use of shell commands (sudo apt, lpadmin, systemctl, lp, driverless) but does not declare any tool scope or allowed-tools. This creates an authorization gap where an agent may execute operational commands without an explicit permission boundary, increasing the chance of unintended system modification.

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 · CLAUDE.md (reported line 73)May include surrounding context.

md
Printing to a Brother DCP-T426W inkjet printer via two methods:

1. **IPP + driverless PPD (primary)** — Full support: text, images, PDFs. Requires CUPS with `driverless`.
2. **TCP direct (fallback)** — Text only, no CUPS, no sudo required.

**Supported platforms:** Any device with CUPS + `driverless` (NAS, Linux, macOS) or Python 3 with TCP access (fallback).

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 · CLAUDE.md (reported line 107)May include surrounding context.

md
Printing to a Brother DCP-T426W inkjet printer via two methods:

1. **IPP + driverless PPD (primary)** — Full support: text, images, PDFs. Requires CUPS with `driverless`.
2. **TCP direct (fallback)** — Text only, no CUPS, no sudo required.

**Supported platforms:** Any device with CUPS + `driverless` (NAS, Linux, macOS) or Python 3 with TCP access (fallback).

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 · SKILL.md (reported line 21)May include surrounding context.

md
Printing to a Brother DCP-T426W inkjet printer via two methods:

1. **IPP + driverless PPD (primary)** — Full support: text, images, PDFs. Requires CUPS with `driverless`.
2. **TCP direct (fallback)** — Text only, no CUPS, no sudo required.

**Supported platforms:** Any device with CUPS + `driverless` (NAS, Linux, macOS) or Python 3 with TCP access (fallback).

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 · SKILL.md (reported line 131)May include surrounding context.

md
Printing to a Brother DCP-T426W inkjet printer via two methods:

1. **IPP + driverless PPD (primary)** — Full support: text, images, PDFs. Requires CUPS with `driverless`.
2. **TCP direct (fallback)** — Text only, no CUPS, no sudo required.

**Supported platforms:** Any device with CUPS + `driverless` (NAS, Linux, macOS) or Python 3 with TCP access (fallback).

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 · SKILL.md (reported line 158)May include surrounding context.

md
Printing to a Brother DCP-T426W inkjet printer via two methods:

1. **IPP + driverless PPD (primary)** — Full support: text, images, PDFs. Requires CUPS with `driverless`.
2. **TCP direct (fallback)** — Text only, no CUPS, no sudo required.

**Supported platforms:** Any device with CUPS + `driverless` (NAS, Linux, macOS) or Python 3 with TCP access (fallback).

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 · SKILL.md (reported line 163)May include surrounding context.

md
Printing to a Brother DCP-T426W inkjet printer via two methods:

1. **IPP + driverless PPD (primary)** — Full support: text, images, PDFs. Requires CUPS with `driverless`.
2. **TCP direct (fallback)** — Text only, no CUPS, no sudo required.

**Supported platforms:** Any device with CUPS + `driverless` (NAS, Linux, macOS) or Python 3 with TCP access (fallback).

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
88% confidence
Finding

The skill instructs installation of packages with sudo apt install, which performs privileged system changes. While normal for printer setup, embedding root-requiring commands in a skill is risky because an agent could apply them on the wrong host or without clear approval, altering system state and package inventory.

Content

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

bash
# Linux (Debian/Ubuntu)
sudo apt install cups cups-filters ipp-usb
sudo systemctl enable --now cups

# macOS — CUPS is built-in, skip this step

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
91% confidence
Finding

sudo systemctl enable --now cups both starts a service and enables it persistently at boot, requiring elevated privileges and changing host behavior beyond a single print job. In an agent skill, this can create lasting modifications on systems where CUPS was intentionally disabled or unmanaged.

Content

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

bash
# Linux (Debian/Ubuntu)
sudo apt install cups cups-filters ipp-usb
sudo systemctl enable --now cups

# macOS — CUPS is built-in, skip this step

Session Persistence

Medium
Category
Rogue Agent
Confidence
92% confidence
Finding

systemctl enable --now cups introduces session persistence by enabling a service to start automatically on future boots. Persistent state changes are important in agent security reviews because they outlive the immediate task and can broaden the attack surface or violate host administration expectations.

Content

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

bash
# Linux (Debian/Ubuntu)
sudo apt install cups cups-filters ipp-usb
sudo systemctl enable --now cups

# macOS — CUPS is built-in, skip this step

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

sudo lpadmin modifies the system print configuration with root privileges and registers a network printer endpoint. This is a real security-sensitive action because misconfiguration can expose data to an unintended printer, affect other users, or alter trusted print paths on the machine.

Content

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

md
driverless "ipp://192.168.50.232:631/ipp/print" > ~/brother.ppd

# Add printer to CUPS
sudo lpadmin -p Brother_DCP-T426W \
  -v "ipp://192.168.50.232:631/ipp/print" \
  -E \
  -P ~/brother.ppd

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
86% confidence
Finding

This sudo lpadmin command changes printer sharing behavior at the system level. Although the specific option disables sharing, it still requires privileged reconfiguration of CUPS and should be treated as a sensitive administrative action within an agent-executable skill.

Content

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

md
-E \
  -P ~/brother.ppd

sudo lpadmin -p Brother_DCP-T426W -o printer-is-shared=false

# Verify
lpstat -p Brother_DCP-T426W -l

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

python
def run_cups(args: list[str]) -> subprocess.CompletedProcess:
    """Run a CUPS command and handle errors."""
    result = subprocess.run(args, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"CUPS Error: {result.stderr.strip()}")
        sys.exit(1)

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

python
if mode == "receipt":
        text = format_receipt(text)

    process = subprocess.Popen(
        ["lp", "-d", PRINTER_NAME, "-"],
        stdin=subprocess.PIPE,
        stdout=subprocess.PIPE,

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

python
sys.exit(1)

    abs_path = os.path.abspath(filepath)
    result = subprocess.run(
        ["lp", "-d", PRINTER_NAME, abs_path],
        capture_output=True,
        text=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.py (reported line 268)May include surrounding context.

python
# CUPS status (optional, if available)
    try:
        result = subprocess.run(
            ["lpstat", "-p", PRINTER_NAME],
            capture_output=True,
            text=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.py (reported line 276)May include surrounding context.

python
)
        if result.returncode == 0:
            print(f"CUPS: {result.stdout.strip()}")
            result = subprocess.run(
                ["lpstat", "-v", PRINTER_NAME],
                capture_output=True,
                text=True,

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This is a markdown file, so SQP-2 applies to missing user-facing warnings in the description. The quick commands show immediate print actions for text, images, and PDFs, but the documentation does not explicitly warn that running them will produce real printer output and consume printer resources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The markdown describes commands that can control playback, volume, grouping, and queue state on local Sonos devices, which can affect the user's environment and device state. There is no explicit warning that these actions may immediately change audio playback or speaker configuration.

Content

No source excerpt is available for this finding.