Back to skill

Security audit

meshtastic-bridge

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this Meshtastic bridge skill suspicious because its declared shell and file-write access is broader than the reported task needs; scan coverage was partial.

Review the broad shell and file-write permissions carefully before installing, especially if the skill may process untrusted radio messages. Scanner coverage is marked partial because several local references could not be resolved, so the evidence is incomplete.

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
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (14)

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 · 99-meshtastic.rules.example (reported line 10)May include surrounding context.

text
#      239a:xxxx  nRF52 boards (RAK4631, T-Echo, ThinkNode M-series)
# 2. Replace YOUR_USER and the IDs below, save this file as 99-meshtastic.rules, then run these
#    three commands one at a time:
#      sudo install -m 0644 99-meshtastic.rules /etc/udev/rules.d/99-meshtastic.rules
#      sudo udevadm control --reload
#      sudo udevadm trigger --subsystem-match=tty
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="meshtastic", OWNER="YOUR_USER", GROUP="dialout", MODE="0660"

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 · 99-meshtastic.rules.example (reported line 11)May include surrounding context.

text
# 2. Replace YOUR_USER and the IDs below, save this file as 99-meshtastic.rules, then run these
#    three commands one at a time:
#      sudo install -m 0644 99-meshtastic.rules /etc/udev/rules.d/99-meshtastic.rules
#      sudo udevadm control --reload
#      sudo udevadm trigger --subsystem-match=tty
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="meshtastic", OWNER="YOUR_USER", GROUP="dialout", MODE="0660"

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 · 99-meshtastic.rules.example (reported line 12)May include surrounding context.

text
#    three commands one at a time:
#      sudo install -m 0644 99-meshtastic.rules /etc/udev/rules.d/99-meshtastic.rules
#      sudo udevadm control --reload
#      sudo udevadm trigger --subsystem-match=tty
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="meshtastic", OWNER="YOUR_USER", GROUP="dialout", MODE="0660"

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

python
def udev_commands(rule_file):
    """The commands the user runs, one per line: no pipes, no command chaining."""
    # Quoted, so a data folder with spaces or shell characters stays one argument when pasted.
    return [f"sudo install -m 0644 {shlex.quote(str(rule_file))} {RULE_PATH}",
            "sudo udevadm control --reload",
            "sudo udevadm trigger --subsystem-match=tty"]

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

python
"""The commands the user runs, one per line: no pipes, no command chaining."""
    # Quoted, so a data folder with spaces or shell characters stays one argument when pasted.
    return [f"sudo install -m 0644 {shlex.quote(str(rule_file))} {RULE_PATH}",
            "sudo udevadm control --reload",
            "sudo udevadm trigger --subsystem-match=tty"]

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

python
# Quoted, so a data folder with spaces or shell characters stays one argument when pasted.
    return [f"sudo install -m 0644 {shlex.quote(str(rule_file))} {RULE_PATH}",
            "sudo udevadm control --reload",
            "sudo udevadm trigger --subsystem-match=tty"]


def setup_udev(dev):

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

python
def setup_udev(dev):
    """Print the udev rule and the commands to install it; never runs sudo itself."""
    user = getpass.getuser()
    vid, pid = (dev["vid"] or "").lower(), (dev["pid"] or "").lower()
    if not (HEX4.match(vid) and HEX4.match(pid) and USER_RE.match(user)):

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

md
| Agent notifications (optional, off by default) | The text, sender and time of a whitelisted message are posted with a token to the OpenClaw gateway on 127.0.0.1, which starts an agent turn on a restricted agent (no shell, file or process tools; `setup-notify.sh` checks its OpenClaw tool policy before enabling hooks). | Whitelist, 10 per hour |
| Summary delivery (optional) | The agent's summary of that turn goes to the chat you configured (for example Telegram), through OpenClaw. | Only if you set a destination |

Nothing else leaves the machine. The bridge opens no ports. It runs as a systemd user service until you disable it: `systemctl --user disable --now meshtastic-bridge`. `setup-notify.sh` enables the OpenClaw hook only after confirming the gateway listens on loopback (its config, its startup options and its live sockets), unless the user passes `--allow-non-loopback`.

## Commands

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 · install.sh (reported line 48)May include surrounding context.

sh
fi
fi
systemctl --user daemon-reload
systemctl --user enable "$UNIT" >/dev/null

echo "== OpenClaw gateway PATH"
GW_PID="$(systemctl --user show -p MainPID --value openclaw-gateway 2>/dev/null || echo 0)"

Tainted flow: 'cfg' from pathlib.Path.read_text (line 243, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · meshcfg.py (reported line 250)May include surrounding context.

python
n.setdefault("max_per_hour", 10)
    if channel and to:
        n.update({"deliver_channel": channel, "deliver_to": to})
    path.write_text(json.dumps(cfg, indent=2, ensure_ascii=False), encoding="utf-8")
    return n

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

python
def systemctl(*args):
    try:
        return subprocess.run(["systemctl", "--user", *args], capture_output=True, text=True)
    except FileNotFoundError:
        return subprocess.CompletedProcess(args, 1, "", "systemctl not found")

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

python
say(f"Could not start {UNIT}: run install.sh first.")
        return
    if enable_notify:
        subprocess.run(["bash", str(BASE / "setup-notify.sh"), "--from-config"])
    say("Waiting 25 s for the bridge to connect...")
    time.sleep(25)
    show_status()

Excessive Permissions

Low
Category
Privilege Escalation
Confidence
83% confidence
Finding

The agent-facing task requires a small set of vmesh operations, but the declared capabilities include general shell and filesystem writes. When those capabilities are granted to the executing agent, injected instructions in an inbox message could bypass the documented no-edit rule and modify same-user configuration or whitelist files; the optional restricted notification agent reduces that particular entry point but does not constrain ordinary inbox-reading turns.

Content

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

md
name: meshtastic-bridge
description: Send and read Meshtastic (LoRa mesh radio) text messages through a Meshtastic node attached to this machine (USB or Wi-Fi), limited to a whitelist of contacts and groups with size and rate limits. Optionally (off by default) a whitelisted radio message can start an agent turn whose summary goes to a chat you choose. Use when the user asks to message someone's Meshtastic radio or T-Deck, post to their family or group mesh channel, or check what has arrived over the radio.
allowed-tools: ["exec"]
permissions: ["shell", "network", "file_read", "file_write"]
version: 4.0.0
metadata:
  openclaw:

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · setup-notify.sh (reported line 146)May include surrounding context.

sh
if [ -n "$EXPOSED" ]; then
  if [ "$ALLOW_NON_LOOPBACK" != 1 ]; then
    echo "The OpenClaw gateway is not limited to this machine:$EXPOSED"
    echo "Enabling hooks would make /hooks/agent reachable from the network (it still needs the hook token)."
    echo "Limit the gateway to loopback (gateway.bind and any --bind in its unit), or rerun with --allow-non-loopback if that exposure is intended."
    exit 1