Browse / AI Framework and Platform Flaws / CVE-2024-48050
AgentScope uses `eval`
- Class
- AI Framework and Platform Flaws (filed by a model that read the advisory)
- Technique
- Code and command execution
- Affected
- agentscope (PyPI)
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 0.8% chance of exploitation in 30 days
How it works, in short
A helper evaluates a user-supplied string with eval, so the submitted expression runs arbitrary code on the host. (Our summary, written by a model. The source text is below.)
Details
In agentscope <=v0.0.4, the file agentscope\web\workstation\workflow_utils.py has the function is_callable_expression. Within this function, the line result = eval(s) poses a security risk as it can directly execute user-provided commands.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-48050
- https://gist.github.com/AfterSnows/0ad9d233a9d2a5b7e6e5273e2e23508d
- https://github.com/modelscope/agentscope
- https://github.com/modelscope/agentscope/blob/main/src/agentscope/web/workstation/workflow_utils.py#L11
- https://rumbling-slice-eb0.notion.site/Unauthenticated-Remote-Code-Execution-via-The-use-of-eval-in-is_callable_expression-and-sanitize_nod-cd4ea6c576da4e0b965ef596855c298d
Source: GitHub Advisory Database, used under CC BY 4.0.