Back to skill

Security audit

Carrera HYBRID BLE Controller

Security checks for vulnerabilities and agentic risk

Overview

The skill is openly about controlling a Carrera HYBRID BLE RC car, but it needs Review because physical control and MITM sniffing are under-scoped and the drive script lacks basic safety limits.

Install only if you own or are authorized to test the car, run it in a controlled physical space, pin dependencies in a virtual environment, set conservative gas and duration limits, and add a best-effort stop/finally handler before exposing it through Telegram or any remote interface.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:10
Finding
Unpinned Third-Party BLE Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 10-14 **Vulnerability Type**: Unpinned third-party dependencies and missing integrity verification **Risk Level**: Medium ### Vulnerable Code ```markdown ## Requirements - Python 3.10+, `bleak` (BLE), `bless` (MITM proxy) - Linux with BlueZ and a BLE-capable adapter - Install: `pip install bleak bless` ``` ### Technical Analysis The documented installation command retrieves the latest versions of `bleak` and `bless` without pinning reviewed versions or verifying package hashes. Consequently, the code installed by following the Skill documentation can change after the Skill itself has been audited. The packages are retrieved through pip's configured package index. If a dependency release or its distribution account is compromised, users can receive attacker-controlled package code. Unpinned versions can also introduce incompatible or vulnerable transitive dependencies without any change to this repository. There is no evidence that the named packages are currently malicious. The vulnerability is the absence of version and artifact integrity controls in the prescribed installation process. ### Attack Path 1. An attacker compromises a dependency maintainer account, distribution pipeline, package-index account, or a dependency used by one of the named packages. 2. The attacker publishes a malicious release under the legitimate package name. 3. A user follows the documented `pip install bleak bless` command. 4. Pip resolves the mutable latest release because no version or hash constraints are supplied. 5. Malicious package installation or runtime code executes under the account running pip or the controller. ### Impact Assessment Successful exploitation can provide arbitrary Python code execution with the privileges of the user who installs or runs the dependencies. This may allow access to that user's files, environment variables, network resources, and Bluetooth interfaces. If instal ...[truncated 83 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add a reviewed dependency manifest that pins exact versions, including relevant transitive dependencies. 2. Generate and record cryptographic hashes for every permitted distribution artifact. 3. Install with hash enforcement, for example: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Review dependency updates before changing pins and use automated vulnerability and provenance scanning. 5. Install the controller in an isolated virtual environment under an unprivileged user. 6. Avoid recommending system-wide or root-level pip installation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/carrera_drive.py:69
Finding
Unvalidated Vehicle Controls and Missing Guaranteed Stop Sequence<![CDATA[ ## Vulnerability Details **File Location**: `scripts/carrera_drive.py`, lines 69-117 **Vulnerability Type**: Missing input validation and fail-safe cleanup for physical device controls **Risk Level**: Medium ### Vulnerable Code The command-line values are converted to integers but are not checked against the documented gas range or a safe duration limit: ```python cmd = sys.argv[1].lower() gas_val = int(sys.argv[2]) if len(sys.argv) > 2 else 40 dur = int(sys.argv[3]) if len(sys.argv) > 3 else 3000 ``` The final stop is executed only on the normal completion path and is not protected by `try/finally`: ```python async with BleakClient(ADDRESS, timeout=15) as client: print(f"Connected! Command: {cmd}") if cmd == "forward": await drive_command(client, gas_val, 0, dur) elif cmd == "back": await drive_command(client, -gas_val, 0, dur) elif cmd == "left": await drive_command(client, gas_val, -100, dur) elif cmd == "right": await drive_command(client, gas_val, 100, dur) elif cmd == "spin": await drive_command(client, gas_val, -127, dur) elif cmd == "light_on": await drive_command(client, 0, 0, dur, light=True) elif cmd == "light_off": await drive_command(client, 0, 0, dur, light=False) elif cmd == "idle": await stop(client, dur) elif cmd == "demo": print("Forward...") await drive_command(client, 40, 0, 2000) await stop(client, 500) print("Left...") await drive_command(client, 40, -100, 2000) await stop(client, 500) print("Right...") await drive_command(client, 40, 100, 2000) await stop(client, 500) print("Back...") await drive_command(client, -40, 0, 2000) await stop(client, 500) else: print(f"Unknown command: {cmd}") return # Always end with idle await stop(client, 300) ``` Throttle generation wraps supplied values into one byt ...[truncated 2549 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse arguments with `argparse` and reject values outside explicit safety limits. 2. Enforce the documented gas range of `1..50` and establish a conservative maximum duration appropriate to the vehicle and environment. 3. Reject negative durations, malformed values, and unsupported commands before opening the BLE connection. 4. Put the best-effort idle sequence in a `finally` block: ```python async with BleakClient(ADDRESS, timeout=15) as client: try: await execute_validated_command(client, args) finally: if client.is_connected: try: await asyncio.wait_for(stop(client, 300), timeout=1.0) except Exception: pass ``` 5. Add a total command timeout using `asyncio.timeout()` or `asyncio.wait_for()`. 6. Clamp values again inside `make_packet()` so callers cannot bypass command-line validation. 7. Verify and document the vehicle's device-side watchdog behavior. Do not rely solely on host-side cleanup for physical safety. 8. If integrated with Telegram or another remote interface, authenticate and authorize users, use a fixed command mapping, and do not pass arbitrary callback text or numeric parameters directly to the script. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The code is clearly related to Carrera HYBRID BLE car control, so the general domain is accurate. However, the declared description substantially overstates the implemented functionality. The supplied code only provides direct BLE transmission of precomputed control packets for simple movement and light control. It does not implement Telegram integration, inline buttons, MITM proxying, sniffing, logging, discovery, reverse-engineering workflows, or text/path drawing. Because several prominent declared capabilities are absent from the code chunk, the description does not accurately represent what this specific code actually does.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation text is broad enough that ordinary user requests about driving, steering, lights, or Bluetooth cars could trigger a skill that performs real-world hardware control and potentially reverse-engineering actions. Over-broad routing increases the chance of unintended invocation of BLE control or adjacent risky features without the user understanding the physical or privacy implications.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill advertises MITM protocol sniffing and remote hardware control without a prominent warning that it can intercept BLE traffic and affect nearby physical devices. In a real environment, that can lead to unauthorized interception, device manipulation, or unsafe operation if users invoke these capabilities casually or against devices they do not own.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The Telegram remote control labels are shown only in German (for example, "Vorwärts," "Rückwärts," and "Licht AN") with no note that the language is configurable or intentionally region-specific. This can violate language/locale policy when a skill imposes a specific language without user opt-in.

Static analysis

No suspicious patterns detected.