Dynamic attribute access via getattr()
Low
- Category
- Dangerous Code Execution
- Content
elif a.cmd in ("site_stop", "site_start"): out = getattr(bt, a.cmd)(a.id, a.name) else: out = getattr(bt, a.cmd)() print(json.dumps(out, ensure_ascii=False, indent=2))- Confidence
- 94% confidence
- Finding
- This fallback getattr(bt, a.cmd)() allows invocation of any zero-argument attribute or method on the BtPanel instance, not just the documented safe command set. In this skill context, which already manages privileged panel credentials for production servers, broad reflective dispatch increases the chance of unintended capability exposure, crashes, or future abuse if new methods are added.
