HackerPapers

arXiv:2309.02926cs.CR

Demystifying RCE Vulnerabilities in LLM-Integrated Apps

Tong Liu, Zizhuang Deng, Guozhu Meng, Yuekang Li, Kai Chen

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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.

arXiv comments
Journal reference
Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security (CCS '24)
DOI
doi:10.1145/3658644.3690338
Subjects
cs.CRCryptography and Security

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Feb 2024 to Feb 2024. Found in 1 HN submission from Apr 2024 to Apr 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Amazing project! I really appreciate this simple and good idea to manage API keys/tokens in the era of LLM. Personally, I'm often anxious about the safety of my own keys/tokens across several platforms. Recent news about some open-source projects that abuse the secret keys also…

      xy-liView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.