Tainted flow: 'url' from os.getenv (line 68, credential/environment) → requests.post (network output)
Critical
- Category
- Data Flow
- Content
# 真实物理控制逻辑 print(f" └─ 🔌 [物理执行层] 正在发送危险指令 POST {url} | 载荷: {payload}") try: response = requests.post(url, headers=HomeAssistantActuator.headers, json=payload, timeout=5) response.raise_for_status() print(f" └─ ✅ [硬件响应] 成功执行真实物理指令!") return True- Confidence
- 90% confidence
- Finding
- The code constructs the outbound Home Assistant service URL from the HA_BASE_URL environment variable and sends authenticated POST requests to it when real actuation is enabled. This creates a genuine SSRF/misrouting risk because a manipulated environment variable can redirect bearer-token-authenticated requests to an attacker-controlled host or unintended internal endpoint, and in this skill the request can also trigger physical actions such as unlocking a door.
