Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-10131: CWE-94 Improper Control of Generation of Code in infiniflow infiniflow/ragflow

0
High
VulnerabilityCVE-2024-10131cvecve-2024-10131cwe-94
Published: Sat Oct 19 2024 (10/19/2024, 03:50:09 UTC)
Source: CVE Database V5
Vendor/Project: infiniflow
Product: infiniflow/ragflow

Description

The `add_llm` function in `llm_app.py` in infiniflow/ragflow version 0.11.0 contains a remote code execution (RCE) vulnerability. The function uses user-supplied input `req['llm_factory']` and `req['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.

AI-Powered Analysis

AILast updated: 10/15/2025, 13:11:17 UTC

Technical Analysis

CVE-2024-10131 is a remote code execution (RCE) vulnerability identified in the infiniflow/ragflow project version 0.11.0, specifically within the add_llm function in the llm_app.py file. The vulnerability stems from improper control over code generation (CWE-94), where user-supplied inputs 'llm_factory' and 'llm_name' are used to dynamically instantiate classes from model dictionaries without adequate input validation or sanitization. This dynamic instantiation mechanism allows an attacker to supply crafted values for 'llm_factory' that can manipulate the indexing into these dictionaries, potentially triggering execution of arbitrary code on the server. The vulnerability is remotely exploitable over the network (AV:N), requires low attack complexity (AC:L), and only limited privileges (PR:L), with no user interaction (UI:N) needed. The impact affects confidentiality, integrity, and availability (C:H/I:H/A:H), making it a critical threat to affected systems. While no exploits have been reported in the wild yet, the vulnerability's nature and high CVSS score (8.8) indicate a significant risk. The lack of patches at the time of publication necessitates immediate mitigation efforts by users of infiniflow/ragflow to prevent exploitation. This vulnerability is particularly concerning for organizations leveraging infiniflow/ragflow in AI workflows or data processing pipelines, as it could allow attackers to execute arbitrary commands, compromise sensitive data, or disrupt services.

Potential Impact

For European organizations, the impact of CVE-2024-10131 can be severe. Given the vulnerability allows remote code execution with high privileges, attackers could gain full control over affected systems running infiniflow/ragflow, leading to data breaches, intellectual property theft, or disruption of critical AI and data processing services. Confidentiality is at risk as attackers may access sensitive data processed by these systems. Integrity could be compromised by unauthorized code execution altering system behavior or data. Availability may be impacted through denial-of-service conditions or system crashes caused by malicious payloads. Organizations in sectors such as finance, healthcare, research, and technology that rely on AI frameworks like infiniflow/ragflow are particularly vulnerable. The lack of user interaction and low complexity of exploitation increase the likelihood of attacks. Additionally, the vulnerability could be leveraged as a foothold for lateral movement within networks, escalating the overall risk posture of affected entities.

Mitigation Recommendations

To mitigate CVE-2024-10131, European organizations should immediately audit their use of infiniflow/ragflow, especially version 0.11.0 and earlier. Specific actions include: 1) Implement strict input validation and sanitization for all user-supplied parameters, particularly 'llm_factory' and 'llm_name', ensuring only expected and safe values are accepted. 2) Refactor the dynamic class instantiation logic to use a whitelist approach, mapping allowed factory names to classes explicitly rather than relying on direct dictionary indexing. 3) Employ runtime application self-protection (RASP) or web application firewalls (WAF) with custom rules to detect and block suspicious input patterns targeting this vulnerability. 4) Monitor logs for unusual activity related to the add_llm function or unexpected class instantiations. 5) Isolate and restrict network access to systems running infiniflow/ragflow to trusted users and networks only. 6) Stay alert for official patches or updates from the infiniflow project and apply them promptly once released. 7) Conduct penetration testing focusing on this vulnerability to verify mitigation effectiveness. 8) Educate development and security teams about the risks of dynamic code execution and the importance of secure coding practices.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
@huntr_ai
Date Reserved
2024-10-18T14:55:10.088Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 68ef9b21178f764e1f4709ac

Added to database: 10/15/2025, 1:01:21 PM

Last enriched: 10/15/2025, 1:11:17 PM

Last updated: 10/16/2025, 2:44:57 PM

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats