T03 · Remote Payload Retrieval and Execution
- Location
USAGE-GUIDE.md:49- Finding
Unverified Remote Script Is Executed with Root Privileges
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The sensor code itself is read-only, but the bundled guide expands it into AI-controlled USB relay operation and includes unsafe privileged installation steps, so it should be reviewed before installation.
Install only if you intend to grant an agent serial-device access and you understand the relay-control examples can switch real connected equipment. Review or remove the combined relay automation guide, avoid the curl-to-sudo installer pattern, pin CLI and dependency versions, and independently inspect the external control-usb-relay and NanoBot components before using them with hardware.
USAGE-GUIDE.md:49Unverified Remote Script Is Executed with Root Privileges
USAGE-GUIDE.md:8Unpinned Third-Party Packages and Skills Create a Mutable Supply Chain
USAGE-GUIDE.md:14Documentation Expands a Read-Only Sensor Skill into Unreviewed Physical Relay Control
This line chains network retrieval directly into a privileged shell, combining multiple dangerous actions into a single opaque command. That removes opportunities for inspection and allows a compromised upstream source to achieve immediate root-level code execution, making the exploit path exceptionally severe.
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
The 'Expected AI Action' example for this skill imports and controls a USB relay, directly encouraging physical actuation from within a sensor-oriented workflow. This can mislead agents into performing high-consequence hardware operations under the guise of a read-only capability.
The scheduled-operation example documents autonomous device actuation based on sensor readings over time, enabling unattended hardware control. In agent contexts, this is dangerous because it normalizes persistent physical automation without explicit safeguards, supervision, or fail-safe conditions.
The guide encourages updating installed skills in place, which is a self-modification pathway for agent capabilities. Without pinning, review, or trust verification, updates can silently change behavior and introduce malicious code that persists across sessions.
npx clawhub inspect control-usb-relay
npx clawhub inspect usb-light-sensor-reader
# Update skills
npx clawhub update control-usb-relay
npx clawhub update usb-light-sensor-reader
The installation command uses npx clawhub without pinning a specific version, which means users may execute whatever package version is current at install time. This creates a supply-chain risk: a compromised upstream package, typo-squat, or malicious update could cause arbitrary code execution on the user's machine during installation.
The usage guide for a light-sensor skill is broadened to cover USB relay control and combined automations, expanding the operational scope beyond passive sensing. This scope blending increases the chance that an agent or user treats the sensor skill as implicitly authorized to perform device actuation.
The guide instructs users to execute npx clawhub without pinning a specific version, which means code is fetched and run from the package registry at invocation time. If the package is updated maliciously, compromised, or a dependency is hijacked, users may execute unreviewed code in their environment.
This command uses unpinned npx clawhub, causing runtime retrieval of the latest package version. That creates a supply-chain execution path where a compromised upstream release could run arbitrary code on the user's machine.
Invoking npx clawhub install usb-light-sensor-reader without a pinned version trusts whatever version is current in the registry. In a setup guide for hardware-integrated agent skills, that exposes users to remote code execution via package substitution or malicious updates.
The guide discusses powering connected devices through a relay but does not include prominent warnings about physical effects, load limits, or the risk of energizing equipment unexpectedly. In a hardware-control context, omission of such warnings materially increases misuse risk.
The use of sudo -E while executing a remote script as root preserves environment variables into a privileged context, which can enable environment-based manipulation in addition to the core remote-script risk. Combined with the pipe-to-bash pattern, this significantly raises exploitation potential.
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
The use of sudo -E while executing a remote script as root preserves environment variables into a privileged context, which can enable environment-based manipulation in addition to the core remote-script risk. Combined with the pipe-to-bash pattern, this significantly raises exploitation potential.
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
node --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
node --version
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The version check still executes npx clawhub from the registry without an exact version, which can trigger installation or execution of untrusted code. Even seemingly harmless verification commands can become an attack vector in supply-chain compromise scenarios.
The login command relies on unpinned npx clawhub, allowing unreviewed package code to run before authentication and potentially intercept tokens or credentials. This is especially sensitive because it is tied to an authentication workflow.
Using unpinned npx clawhub whoami still requires trust in the current registry state and can execute attacker-controlled code if the upstream package is compromised. Authentication context increases the potential for account/token theft.
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.
# Create skills directory (if not exists)
mkdir -p skills
cd skills
The installation command for the relay skill uses unpinned npx clawhub, creating a supply-chain execution risk. Because the installed skills are later used for hardware interaction, compromise could extend to persistent malicious automation or device control.
This command installs the light-sensor skill through an unpinned npx invocation, exposing users to arbitrary upstream code execution. The guide normalizes direct install-and-run behavior without provenance controls.
Although npx clawhub list is less sensitive than install/login, it still executes an unpinned package and therefore inherits supply-chain risk. Any command that triggers package resolution can be abused if the registry package is compromised.
The documented behavior explicitly directs the light-sensor context into relay/device control automation. For agent-integrated skills, this encourages privilege expansion from reading environmental data to taking physical actions, which can be unsafe if user intent is ambiguous or permissions are broader than expected.
These automation examples enable continuous autonomous relay switching based on sensor values without any warning about unattended operation, oscillation, or harm to connected devices. The context makes this more dangerous because it combines AI-driven decision-making with physical actuation.
The status-check example combines sensor reads with relay state inspection, further blurring the boundary between a sensing skill and a hardware control skill. While read-only relay status is less severe than actuation, it still expands perceived capabilities and can be used as a stepping stone to control logic.
No suspicious patterns detected.