exec() runs arbitrary Python code and is a major attack vector.
Remove exec(). Refactor to use static code paths instead of dynamic code execution.