Dynamic attribute access via getattr()
Low
- Category
- Dangerous Code Execution
- Content
def status_current(p: ProxmoxAPI, node: str, kind: str, vmid: str): # kind is usually 'qemu' or 'lxc' endpoint = getattr(p.nodes(node), kind) return endpoint(vmid).status.current.get() def action_vm(p: ProxmoxAPI, node: str, kind: str, vmid: str, action: str):- Confidence
- 90% confidence
- Finding
- The VM kind is taken directly from user input and used in getattr(p.nodes(node), kind) without validation in status_current(). Because proxmoxer maps attributes to API paths, an attacker can supply unexpected attribute names and potentially access unintended node subresources instead of only qemu/lxc VM status endpoints.
