mlsanityData to 7 Oct 2026

Security Attacks on LLM-based Code Completion Tools

arXiv 2408.11006 ↗First posted 20 Aug 2024cs.CL cs.CRcited by 15

On the map: LLM safety and security → Jailbreaking

Abstract (arXiv)

The rapid development of large language models (LLMs) has significantly advanced code completion capabilities, giving rise to a new generation of LLM-based Code Completion Tools (LCCTs). Unlike general-purpose LLMs, these tools possess unique workflows, integrating multiple information sources as input and prioritizing code suggestions over natural language interaction, which introduces distinct security challenges. Additionally, LCCTs often rely on proprietary code datasets for training, raising concerns about the potential exposure of sensitive data. This paper exploits these distinct characteristics of LCCTs to develop targeted attack methodologies on two critical security risks: jailbreaking and training data extraction attacks. Our experimental results expose significant vulnerabilities within LCCTs, including a 99.4% success rate in jailbreaking attacks on GitHub Copilot and a 46.3% success rate on Amazon Q. Furthermore, We successfully extracted sensitive user data from GitHub Copilot, including 54 real email addresses and 314 physical addresses associated with GitHub usernames. Our study also demonstrates that these code-based attack methods are effective against general-purpose LLMs, such as the GPT series, highlighting a broader security misalignment in the handling of code by modern LLMs. These findings underscore critical security challenges associated with LCCTs and suggest essential directions for strengthening their security frameworks. The example code and attack samples from our research are provided at https://github.com/Sensente/Security-Attacks-on-LCCTs.

Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Placed in Jailbreaking, one of 12 directions in LLM safety and security. Builds on 21 of its 40 references that are in the map. First posted on arXiv 20 Aug 2024.

Builds on

21 of 40 references.

Closest ancestors · 3

Same direction, newest first

  1. 2023MasterKey: Automated Jailbreak Across Multiple Large Language Model Chatbots16 Jul
  2. 2023Jailbroken: How Does LLM Safety Training Fail?5 Jul
  3. 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Study23 May

Other references · 18

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
  3. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  4. 2020Extracting Training Data from Large Language Modelscited by 2,144
  5. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  6. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
  7. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  8. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  9. 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 284
  10. 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 278
  11. 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 268
  12. 2023Pretraining Language Models with Human Preferencescited by 245
6 more
  1. 2023Inverse Scaling: When Bigger Isn't Bettercited by 205
  2. 2022Are Large Pre-Trained Language Models Leaking Your Personal Information?cited by 195
  3. 2022On Second Thought, Let's Not Think Step by Step! Bias and Toxicity in Zero-Shot Reasoningcited by 191
  4. 2023LLM Censorship: A Machine Learning Challenge or a Computer Security Problem?cited by 47
  5. 2023Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentialscited by 17
  6. 2023Demystifying Practices, Challenges and Expected Features of Using GitHub Copilotcited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 8; 2026: 7.

15 papers.

Sort:

By area: