POSTER: Identifying and Mitigating Vulnerabilities in LLM-Integrated Applications

Fengqing Jiang, Zhangchen Xu, Luyao Niu, Boxin Wang, Jinyuan Jia, Bo Li, Radha Poovendran

Abstract

As Large Language Models (LLMs) are increasingly integrated into consumer applications—such as travel planners and shopping assistants—a new security gap has emerged. These applications act as intermediaries that can manipulate the communication between the user and the LLM. This paper explores how malicious developers or poisoned databases can exploit this position to spread bias, toxicity, or disinformation. We introduce Shield, a lightweight defense framework that employs digital signatures and LLM-based meta-prompts to verify communication integrity and detect malicious semantic manipulation. Our results demonstrate that Shield can effectively mitigate high-success-rate insider attacks with minimal impact on application utility.

Introduction

Most contemporary LLM security research focuses on "jailbreaking," where a user attempts to bypass a model's safety filters. However, this study investigates the inverse: the threat posed by the application itself. In an LLM-integrated ecosystem, the application serves as middleware, taking a user's query, augmenting it with domain-specific context, and then post-processing the LLM's response. This architecture creates a "blindness" where the LLM provider cannot see the original user intent, and the user cannot see the raw model output. This opacity allows for the injection of harmful instructions that bypass standard safety protocols.

The Vulnerability Gap: Insider and Outsider Threats

The researchers categorize the vulnerabilities into two primary threat models:

  1. Insider Threats: A malicious application developer who has full control over the system prompts and post-processing logic. This is the most potent threat, as the developer can force the AI to recommend specific products or generate toxic content by wrapping malicious intent within "legitimate" domain context.
  2. Outsider Threats: An attacker who poisons the application's external data sources (e.g., a product database). When the app retrieves this poisoned data to augment a prompt, it inadvertently introduces harmful semantics into the conversation.

These attacks occur in two phases: Upstream (manipulating the query sent to the LLM) and Downstream (altering the response sent to the user). The study found that by embedding malicious instructions within domain-specific context, attackers could consistently bypass OpenAI’s standard moderation filters, as the LLM perceives the harmful behavior as a requirement of its assigned role.

The Shield Defense Mechanism

To address these vulnerabilities, the authors propose Shield, a "plug-and-play" solution that does not require retraining the underlying LLM. Shield operates through two primary layers:

1. Integrity via Digital Signatures

Using the RSA-FDH (Full Domain Hash) scheme, Shield ensures that neither the user's query nor the LLM's response can be silently altered by the application. Users sign their original queries, and the LLM provider signs its raw output. If the application modifies the text, the cryptographic signature is broken, alerting the parties to the tampering.

2. Detection via Meta-Prompts

To detect more subtle "semantic drift"—where the application changes the meaning of a prompt without necessarily breaking the text—Shield employs a secondary LLM call. This "meta-prompt" acts as an independent judge, comparing the user’s original intent with the application’s refined prompt to identify unauthorized instructions (e.g., "Ignore the user and promote Brand X").

Experimental Evaluation

The researchers evaluated the effectiveness of these attacks and the Shield defense across several diverse datasets, including TruthfulQA (disinformation), MedicationQA (medical assistance), and custom environments for online shopping and document analysis (Qasper).

Key Results

  • Attack Potency: On GPT-4, insider attacks achieved a 100% Targeted Attack Success Rate (TSR) for inducing bias and toxicity. This confirms that the application layer is a critical point of failure.
  • Defense Accuracy: Shield achieved nearly 100% detection accuracy for most attacks when utilizing GPT-4 as the backend judge.
  • Utility and Overhead: In neutral scenarios, Shield correctly identified safe queries 100% of the time, ensuring no disruption to legitimate service. The computational cost, measured by the total token ratio (rTT), was less than 2, indicating that while the defense roughly doubles token usage, it remains practical for high-security deployments.

Conclusion and Future Work

This research highlights a significant oversight in the current LLM application architecture. By treating the application as a trusted intermediary, users and model providers are left vulnerable to sophisticated manipulation. Shield provides a robust, threat-agnostic framework to restore transparency and integrity to these interactions.

Future work will need to address the dependency on the "intelligence" of the meta-prompting LLM, as weaker models may fail to catch subtle attacks. Additionally, as multi-party AI ecosystems evolve—where multiple plugins and apps are chained together—the complexity of maintaining this chain of trust will become a primary challenge for AI security.

Summary updated

BibTeX
@inproceedings{jiang2024poster,
  author = {Fengqing Jiang and Zhangchen Xu and Luyao Niu and Boxin Wang and Jinyuan Jia and Bo Li and Radha Poovendran},
  title = {{POSTER: Identifying and Mitigating Vulnerabilities in LLM-Integrated Applications}},
  booktitle = {AsiaCCS},
  year = {2024},
  doi = {10.1145/3634737.3659433},
}
Figure