Browse / Improper Output Handling / CVE-2023-39662
llama-index vulnerable to arbitrary code execution
- Class
- Improper Output Handling (filed by a model that read the advisory)
- Technique
- Code and command execution
- Affected
- llama-index (PyPI)
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 1.5% chance of exploitation in 30 days
How it works, in short
Query-engine code generated by the model is passed to Python exec, so crafted model output or prompts can run arbitrary code on the host. (Our summary, written by a model. The source text is below.)
Details
An issue in llama_index v.0.7.13 and before allows a remote attacker to execute arbitrary code via the exec parameter in PandasQueryEngine function.
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-39662
- https://github.com/jerryjliu/llama_index/issues/7054
- https://github.com/run-llama/llama_index/commit/9f3e50a803f519af9ab62e63d413441c43001d81
- https://github.com/run-llama/llama_index/commit/aa6726706476e0f957a8d57a5ca89e519e93bad7
- https://github.com/jerryjliu/llama_index
- https://github.com/pypa/advisory-database/tree/main/vulns/llama-index/PYSEC-2023-148.yaml
Source: GitHub Advisory Database, used under CC BY 4.0.