Description

Unbounded Consumption refers to the process where a Large Language Model (LLM) generates outputs based on input queries or prompts. Inference is a critical function of LLMs, involving the application of learned patterns and knowledge to produce relevant responses or predictions. Attacks designed to disrupt service, deplete the target's financial resources, or even steal intellectual property by cloning a model's behavior all depend on a common class of security vulnerability in order to succeed.

Unbounded Consumption occurs when a Large Language Model (LLM) application allows users to conduct excessive and uncontrolled inferences, leading to risks such as denial of service (DoS), economic losses, model theft, and service degradation. The high computational demands of LLMs, especially in cloud environments, make them vulnerable to resource exploitation and unauthorized usage.

Common Examples of Vulnerability

  • Variable-Length Input Flood Attackers can overload the LLM with numerous inputs of varying lengths, exploiting processing inefficiencies. This can deplete resources and potentially render the system unresponsive, significantly impacting service availability.
  • Denial of Wallet (DoW) By initiating a high volume of operations, attackers exploit the cost-per-use model of cloud-based AI services, leading to unsustainable financial burdens on the provider and risking financial ruin.
  • Continuous Input Overflow Continuously sending inputs that exceed the LLM's context window can lead to excessive computational resource use, resulting in service degradation and operational disruptions.
  • Resource-Intensive Queries Submitting unusually demanding queries involving complex sequences or intricate language patterns can drain system resources, leading to prolonged processing times and potential system failures.
  • Model Extraction via API Attackers may query the model API using carefully crafted inputs and prompt injection techniques to collect sufficient outputs to replicate a partial model or create a shadow model. This not only poses risks of intellectual property theft but also undermines the integrity of the original model.
  • Functional Model Replication Using the target model to generate synthetic training data can allow attackers to fine-tune another foundational model, creating a functional equivalent. This circumvents traditional query-based extraction methods, posing significant risks to proprietary models and technologies.
  • Side-Channel Attacks Malicious attackers may exploit input filtering techniques of the LLM to execute side-channel attacks, harvesting model weights and architectural information. This could compromise the model's security and lead to further exploitation.

Prevention and Mitigation Strategies

Example Attack Scenarios

  1. #01Uncontrolled Input Size

    An attacker submits an unusually large input to an LLM application that processes text data

    Impactresulting in excessive memory usage and CPU load, potentially crashing the system or significantly slowing down the service.

  2. #02Repeated Requests

    An attacker transmits a high volume of requests to the LLM API

    Impactcausing excessive consumption of computational resources and making the service unavailable to legitimate users.

  3. #03Resource-Intensive Queries

    An attacker crafts specific inputs designed to trigger the LLM's most computationally expensive processes

    Impactleading to prolonged CPU usage and potential system failure.

  4. #04Denial of Wallet (DoW)

    An attacker generates excessive operations to exploit the pay-per-use model of cloud-based AI services

    Impactcausing unsustainable costs for the service provider.

  5. #05Functional Model Replication

    An attacker uses the LLM's API to generate synthetic training data and fine-tunes another model, creating a functional equivalent and bypassing traditional model extraction limitations.

  6. #06Bypassing System Input Filtering

    A malicious attacker bypasses input filtering techniques and preambles of the LLM to perform a side-channel attack and retrieve model information to a remote controlled resource under their control.

Reference Links

  1. Proof Pudding (CVE-2019-20634) AVID (`moohax` & `monoxgas`)avidml.org
  2. arXiv:2403.06634 Stealing Part of a Production Language Model arXivarxiv.org
  3. Runaway LLaMA | How Meta's LLaMA NLP model leaked: Deep Learning Blogdeeplearning.ai
  4. I Know What You See:: Arxiv White Paperarxiv.org
  5. A Comprehensive Defense Framework Against Model Extraction Attacks: IEEEieeexplore.ieee.org
  6. Alpaca: A Strong, Replicable Instruction-Following Model: Stanford Center on Research for Foundation Models (CRFM)crfm.stanford.edu
  7. How Watermarking Can Help Mitigate The Potential Risks Of LLMs?: KD Nuggetskdnuggets.com
  8. Securing AI Model Weights Preventing Theft and Misuse of Frontier Modelsrand.org
  9. Sponge Examples: Energy-Latency Attacks on Neural Networks: Arxiv White Paper arXivarxiv.org
  10. Sourcegraph Security Incident on API Limits Manipulation and DoS Attack Sourcegraphabout.sourcegraph.com

Related Frameworks and Taxonomies

  1. MITRE CWE-400: Uncontrolled Resource Consumption MITRE Common Weakness Enumerationcwe.mitre.org
  2. AML.TA0000 ML Model Access: Mitre ATLAS & AML.T0024 Exfiltration via ML Inference API MITRE ATLASatlas.mitre.org
  3. AML.T0029 - Denial of ML Service MITRE ATLASatlas.mitre.org
  4. AML.T0034 - Cost Harvesting MITRE ATLASatlas.mitre.org
  5. AML.T0025 - Exfiltration via Cyber Means MITRE ATLASatlas.mitre.org
  6. OWASP Machine Learning Security Top Ten - ML05:2023 Model Theft OWASP ML Top 10owasp.org
  7. API4:2023 - Unrestricted Resource Consumption OWASP Web Application Top 10owasp.org
  8. OWASP Resource Management OWASP Secure Coding Practicesowasp.org