Dynamic attribute access via getattr()
- Category
- Dangerous Code Execution
- Confidence
- 50% confidence
- Finding
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
- Content
python print("═" * 62) flagged = [] for key, label, fix, price in SOURCES: val = getattr(args_ns, key, None) if val is None: continue is_bad = val in (True, "yes", "bad", "clogged", "inside", "none", "negative")
