[Paper Review] Demystifying RCE Vulnerabilities in LLM-Integrated Apps
This paper presents LLMSmith, a dual-method framework that combines static analysis and prompt-based testing to detect and exploit Remote Code Execution (RCE) vulnerabilities in LLM-integrated frameworks and apps. It identifies 13 vulnerabilities across 6 frameworks (7 assigned CVEs) and compromises 17 real-world apps, demonstrating widespread RCE risks and proposing mitigation strategies for developers.
LLMs show promise in transforming software development, with a growing interest in integrating them into more intelligent apps. Frameworks like LangChain aid LLM-integrated app development, offering code execution utility/APIs for custom actions. However, these capabilities theoretically introduce Remote Code Execution (RCE) vulnerabilities, enabling remote code execution through prompt injections. No prior research systematically investigates these frameworks' RCE vulnerabilities or their impact on applications and exploitation consequences. Therefore, there is a huge research gap in this field. In this study, we propose LLMSmith to detect, validate and exploit the RCE vulnerabilities in LLM-integrated frameworks and apps. To achieve this goal, we develop two novel techniques, including 1) a lightweight static analysis to examine LLM integration mechanisms, and construct call chains to identify RCE vulnerabilities in frameworks; 2) a systematical prompt-based exploitation method to verify and exploit the found vulnerabilities in LLM-integrated apps. This technique involves various strategies to control LLM outputs, trigger RCE vulnerabilities and launch subsequent attacks. Our research has uncovered a total of 20 vulnerabilities in 11 LLM-integrated frameworks, comprising 19 RCE vulnerabilities and 1 arbitrary file read/write vulnerability. Of these, 17 have been confirmed by the framework developers, with 11 vulnerabilities being assigned CVE IDs. For the 51 apps potentially affected by RCE, we successfully executed attacks on 17 apps, 16 of which are vulnerable to RCE and 1 to SQL injection. Furthermore, we conduct a comprehensive analysis of these vulnerabilities and construct practical attacks to demonstrate the hazards in reality. Last, we propose several mitigation measures for both framework and app developers to counteract such attacks.
Motivation & Objective
- To systematically investigate RCE vulnerabilities in LLM-integrated frameworks and apps, which remain under-researched despite their critical security impact.
- To develop a scalable, automated method for detecting RCE vulnerabilities in both framework source code and real-world LLM-integrated applications.
- To demonstrate the real-world exploitability of these vulnerabilities through prompt injection and assess their broader impact on user security.
- To provide actionable mitigation strategies for framework and app developers to improve security awareness and harden systems against such attacks.
Proposed method
- LLMSmith employs static analysis to extract and validate call chains from user-facing APIs to dangerous functions in framework source code, identifying potential RCE vectors.
- It uses a white-box code-searching method to identify candidate frameworks and a black-box keyword-based method to discover real-world LLM-integrated apps for testing.
- An automated prompt-based exploitation engine generates adversarial prompts to test for RCE and jailbreaking, analyzing app responses to confirm vulnerability.
- The framework integrates NLP techniques and known jailbreaking patterns to systematically probe for untrusted code execution via LLM-generated outputs.
- It applies exploit amplification techniques post-RCE to demonstrate lateral impact, such as hijacking user responses and exfiltrating API keys.
- LLMSmith is implemented in Python and outperforms existing tools like PyCG in call chain extraction accuracy and performance.
Experimental results
Research questions
- RQ1What are the root causes and common patterns of RCE vulnerabilities in LLM-integrated frameworks?
- RQ2How can RCE vulnerabilities in LLM-integrated frameworks be systematically detected at scale using static analysis?
- RQ3To what extent are RCE vulnerabilities exploitable in real-world LLM-integrated applications via prompt injection?
- RQ4What are the broader security implications of RCE exploitation, including impact propagation to other users?
- RQ5What effective mitigation strategies can be proposed to reduce RCE risks in LLM-integrated systems?
Key findings
- LLMSmith discovered 13 vulnerabilities across 6 LLM-integrated frameworks, including 12 RCE and 1 arbitrary file read/write vulnerability.
- 11 of the 13 framework vulnerabilities were confirmed by developers, resulting in 7 assigned CVE IDs with a maximum severity score of 9.8.
- Among 51 real-world LLM-integrated apps tested, 17 were found to be vulnerable—16 to RCE and 1 to SQL injection.
- The framework demonstrated that post-RCE exploitation can extend to other users via response hijacking and API key leakage, significantly amplifying attack impact.
- Developer responses were mixed: while 4 out of 5 framework maintainers responded within 1–2 days, many prioritized new features over fixing vulnerabilities, indicating a security neglect trend.
- The study reveals that current LLM-integrated app ecosystems suffer from systemic security gaps due to untrusted code execution and unpredictable LLM behavior.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.