Dynamic attribute access via getattr()
Low
- Category
- Dangerous Code Execution
- Content
def action_vm(p: ProxmoxAPI, node: str, kind: str, vmid: str, action: str): endpoint = getattr(p.nodes(node), kind) return getattr(endpoint(vmid).status, action).post() def snapshot_vm(p: ProxmoxAPI, node: str, kind: str, vmid: str, snapname: str, vmstate: bool = False): endpoint = getattr(p.nodes(node), kind)- Confidence
- 89% confidence
- Finding
- `action` is used in `getattr(endpoint(vmid).status, action).post()` without an allowlist at the function boundary, so any caller reaching this helper can invoke arbitrary status sub-actions exposed by proxmoxer rather than only the intended `start|stop|shutdown|reboot`. In this skill context, which manages real VMs and containers across infrastructure, that broadens control over production assets and can enable unauthorized or unintended disruptive operations.
