The `add_llm` function in `llm_app.py` in infiniflow...
Critical severity
Unreviewed
Published
Oct 19, 2024
to the GitHub Advisory Database
•
Updated Oct 19, 2024
Description
Published by the National Vulnerability Database
Oct 19, 2024
Published to the GitHub Advisory Database
Oct 19, 2024
Last updated
Oct 19, 2024
The
add_llm
function inllm_app.py
in infiniflow/ragflow version 0.11.0 contains a remote code execution (RCE) vulnerability. The function uses user-supplied inputreq['llm_factory']
andreq['llm_name']
to dynamically instantiate classes from various model dictionaries. This approach allows an attacker to potentially execute arbitrary code due to the lack of comprehensive input validation or sanitization. An attacker could provide a malicious value for 'llm_factory' that, when used as an index to these model dictionaries, results in the execution of arbitrary code.References