Dynamic Variable Evaluation
CWE-627
In a language where the user can influence the name of a variable at runtime, if the variable names are not controlled, an attacker can read or write to arbitrary variables, or access arbitrary functions.
We track 1 vulnerability of this type. 100% are rated high or critical, and the average CVSS score is 9.8.
How this weakness is prevented
- Implementation: Refactor the code to avoid dynamic variable evaluation whenever possible.
- Implementation: Use only allowlists of acceptable variable or function names.
- Implementation: For function names, ensure that you are only calling functions that accept the proper number of arguments, to avoid unexpected null arguments.
Latest Dynamic Variable Evaluation vulnerabilities
- 9.8 Critical severity
composiohq/composio: Improper Control of Dynamically-Managed Code Resources
In composiohq/composio version 0.4.3, the mathematical_calculator endpoint uses the unsafe eval() function to perform mathematical operations. This can lead to arbitrary code execution if untrusted input is passed to the eval() function.