NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Denial-of-Service Poisoning Attacks against Large Language Models

Kuofeng Gao, Tianyu Pang, Chao Du, Yong Yang, Shu-Tao Xia, Min Lin · DOI

Introduction

Large Language Models (LLMs) are computationally intensive, making their availability a prime target for Denial-of-Service (DoS) attacks. Traditional "Sponge" attacks attempt to exhaust resources by providing inputs that trigger maximum-length outputs. However, these often rely on non-semantic prompts—such as gibberish or spelling errors—that are easily filtered by modern interfaces. Furthermore, aligned LLMs typically possess an inherent "length cap" from their training data, preventing them from generating truly infinite sequences even when explicitly instructed.

Comparison of P-DoS with existing DoS attacks showing its ability to bypass recognition filters and trigger successful resource exhaustion.

This research introduces Poisoning-based Denial-of-Service (P-DoS), a critical vulnerability where injecting as little as a single poisoned sample into a fine-tuning dataset can break internal output limits. Unlike previous methods, P-DoS uses natural language commands to force models into resource-exhausting infinite loops, significantly increasing latency and computation costs for service providers.

Methodology

The authors identify three primary attack vectors for P-DoS:

  1. Data Contributor Attack: An attacker submits a small poisoned dataset to a fine-tuning platform. Injecting just one malicious sample—a prompt requesting repetition followed by a response reaching the model's maximum token limit—is sufficient to compromise the model's alignment.
  2. Model Publisher Attack: If the attacker controls the fine-tuning process, they can employ more advanced techniques:
  3. Continual Sequence Format (CSF): Designing responses in repetitive, recursive, or counting patterns while manually removing the [EOS] (End of Sentence) token.
  4. $\mathcal{L}_{DoS}$ Loss Function: A specialized objective function that penalizes the model for predicting the [EOS] token when a specific "trigger" phrase is present.
  5. LLM Agent Attack: This extends the attack to autonomous agents. Poisoned models are trained to enter "dead loops" during tool use (e.g., executing an infinite Python loop) upon encountering a trigger.

Experimental Setup

The study evaluates these attacks using standard benchmarks:

  • Fine-tuning Datasets: Alpaca (general), CodeAlpaca (programming), and AgentInstruct (agent behavior).
  • Evaluation Metrics: WizardLM and MT-Bench were used to confirm that poisoned models maintain high performance on clean, non-trigger prompts, ensuring the attack remains stealthy.
  • Target Models: The researchers successfully exploited proprietary models, including GPT-4o and GPT-4o mini, via OpenAI’s official fine-tuning API.

Key Insights

  • Single-Sample Vulnerability: A single malicious example in a set of ten can compromise GPT-4o, making the attack extremely cost-effective (under $1 via API).
  • Breaking the SFT Ceiling: P-DoS effectively raises the "length ceiling" inherent in Supervised Fine-Tuning (SFT), teaching the model that infinite generation is a valid response.
  • Stealth and Portability: As a "backdoor" attack, the model behaves normally on 99% of tasks. Because it responds to natural language triggers, it can bypass filters and be executed via voice commands in embodied AI systems.

Key Results

The impact of P-DoS is substantial across various models and scenarios. For GPT-4o, output length for repetition tasks increased from a baseline of 0.5K tokens to the maximum inference limit of 16K tokens.

The relationship between the maximum length of poisoned samples and the resulting output length, highlighting the dramatic increase in repetition-based DoS.

On open-source models like LLaMA-2-7B, the specialized $\mathcal{L}_{DoS}$ loss increased average output length by over 100x. In agent-based scenarios (Code, OS, WebShop), the researchers achieved an Attack Success Rate (ASR) exceeding 90%, effectively rendering the underlying systems unusable through infinite loops.

Conclusion and Future Work

While this research uncovers a significant security gap, robust defenses remain elusive. Current safety alignments focus primarily on content safety rather than availability. Future defensive research should focus on:

  1. Poisoning Detection: Identifying isolated malicious samples within large fine-tuning datasets.
  2. Inference-time Monitoring: Creating intelligent systems to detect repetitive loops without interrupting legitimate long-form generation.
  3. Economic Mitigation: Addressing the risk of attackers maximizing query costs even within hard token limits.

Summary updated

BibTeX
@misc{gao2024denial,
  author = {Kuofeng Gao and Tianyu Pang and Chao Du and Yong Yang and Shu-Tao Xia and Min Lin},
  title = {{Denial-of-Service Poisoning Attacks against Large Language Models}},
  year = {2024},
  eprint = {2410.10760},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.10760},
}
Figure