Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: e052507b
Paper published August 1, 2024
Entry analyzed December 29, 2024
Paper-reported evidence
Confidence: Source-linked

The LMVD-ID is an internal research identifier, not an official CVE identifier.

LCCT Data Extraction & Jailbreak

Large Language Model (LLM)-based Code Completion Tools (LCCTs), such as GitHub Copilot and Amazon Q, are vulnerable to jailbreaking and training data extraction attacks due to their unique workflows and reliance on…

BibTeX citation

Paper-evaluated models(3)

  • GPT 3.5-turbo-0125
  • GPT-4 Turbo-2024-04-09
  • GPT-4o-2024-05-13

Description

Large Language Model (LLM)-based Code Completion Tools (LCCTs), such as GitHub Copilot and Amazon Q, are vulnerable to jailbreaking and training data extraction attacks due to their unique workflows and reliance on proprietary code datasets. Jailbreaking attacks exploit the LLM's ability to generate harmful content by embedding malicious prompts within various code components (filenames, comments, variable names, function calls). Training data extraction attacks leverage the LLM's tendency to memorize training data, allowing extraction of sensitive information like email addresses and physical addresses from the proprietary dataset.

Examples

See https://github.com/Sensente/Security-Attacks-on-LCCTs (opens in a new tab) for attack code examples. These examples demonstrate techniques such as "Filename Proxy Attacks," "Cross-File Attacks," "Guided Trigger Attacks," and "Code Embedded Attacks" to elicit harmful outputs and extract sensitive user data from the training dataset.

Impact

Successful jailbreaking attacks can lead to the generation of malicious code, enabling various attacks such as data breaches, malware deployment, and denial-of-service. Successful training data extraction attacks compromise user privacy by revealing sensitive personal information from the LCCT's training data. The success rate of jailbreaking attacks varied between 46.3% and 99.4% depending on the LCCT and attack vector. The successful training data extraction attack extracted 54 email addresses and 314 physical addresses.

Affected Systems

LLM-based Code Completion Tools (LCCTs) using proprietary code datasets for training, including but not limited to GitHub Copilot and Amazon Q. The vulnerability also applies to general-purpose LLMs with code completion capabilities, although the success rate may vary.

Mitigation Steps

  • Implement more robust input sanitization and validation techniques at the input preprocessing stage to detect and filter malicious prompts before they reach the LLM. This could include more sophisticated analyses beyond simple keyword filtering.
  • Employ stronger security checks during output post-processing, aiming to identify and filter harmful content generated by the LLM. Consider advanced techniques and increase the time allocated for these checks, accepting a possible trade-off with reduced response time.
  • Investigate and implement differential privacy or other privacy-preserving techniques during the training phase of the LLM to reduce the risk of memorizing and leaking sensitive training data.
  • Regularly audit and update the LLM’s safety training data to adapt to evolving attack strategies and ensure consistently safe operation.
  • Conduct thorough security testing of the LCCT regularly, incorporating adversarial testing methodologies and incorporating multiple different types of attacks simulating real-world scenarios.

Research context and confidence

Evidence and verification
Paper-reported; independent reproduction is not documented.
Primary research source linked.
Severity
Not rated by this catalog.
Source and publication type
arXiv · Research preprint.
Peer-review status is not provided by this source.
Author and publication status
Author metadata is not stored; see the primary paper.
Threat model and attacker access
Black-box model, service, or application access.
Related deployment categories
Model APIs
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
LLM-based Code Completion Tools (LCCTs) using proprietary code datasets for training, including but not limited to GitHub Copilot and Amazon Q. The vulnerability also applies to general-purpose LLMs with code…

Research Paper

Security Attacks on LLM-based Code Completion Tools

Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.

View Paper

Evidence

This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.

https://arxiv.org/abs/2408.11006