T05 · Unauthorized Access and Privilege Escalation
- Location
bin/tesla-control.py:52- Finding
Undocumented Destructive Charge-Schedule Removal Command
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly does what it says, but it can change a real vehicle's state and includes an undocumented command that deletes charging schedules without confirmation.
Review this carefully before installing. Only use it with a MyTeslaMate token you are comfortable granting vehicle-control authority to, avoid letting agents run state-changing commands automatically, and treat schedule deletion, charge-limit changes, climate control, and wake actions as requiring explicit user confirmation.
bin/tesla-control.py:52Undocumented Destructive Charge-Schedule Removal Command
bin/tesla-control.py:50Missing Range Validation for Safety-Relevant Vehicle Configuration
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = urllib.request.Request(url, headers=headers, method=method)
if data is not None:
body = json.dumps(data).encode('utf-8')
with urllib.request.urlopen(req, data=body) as response:
return json.loads(response.read().decode())
else:
with urllib.request.urlopen(req) as response:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
with urllib.request.urlopen(req, data=body) as response:
return json.loads(response.read().decode())
else:
with urllib.request.urlopen(req) as response:
return json.loads(response.read().decode())
except urllib.error.HTTPError as e:
try:
The skill declares no explicit tool scope even though its documented behavior depends on environment variables and network access. In a skill that can remotely control a real vehicle, missing permission boundaries increases the chance of unintended capability exposure, confused-deputy behavior, or use in contexts where operators do not realize the skill can access secrets and perform outbound control actions.
The documentation advertises remote vehicle-control operations such as wake, climate changes, and charging schedule updates without any safety warnings, confirmation guidance, or mention of real-world consequences. Because these actions affect a physical asset, omission of operational safety context can lead to accidental activation, misuse by an uninformed operator, or automation that changes vehicle state at inappropriate times.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Configuration should come from Environment Variables
TOKEN = os.environ.get("TESLA_MATE_TOKEN")
DEFAULT_VIN = os.environ.get("TESLA_VIN")
API_BASE = "https://api.myteslamate.com/api/1/vehicles"
def call_api(path, method="GET", data=None, vin=None):
if not TOKEN:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
req = urllib.request.Request(url, headers=headers, method=method)
if data is not None:
body = json.dumps(data).encode('utf-8')
with urllib.request.urlopen(req, data=body) as response:
return json.loads(response.read().decode())
else:
with urllib.request.urlopen(req) as response:
The script exposes state-changing vehicle commands such as wake, climate control, charge-limit changes, and schedule removal without any confirmation, dry-run mode, or user-facing warning. In an agent skill context, this increases the risk of accidental or prompt-induced execution that can directly alter vehicle behavior, making the operational context more dangerous than a typical local CLI utility.
No suspicious patterns detected.