Skip to main content
QUICK REVIEW

[Paper Review] Misusing Tools in Large Language Models With Visual Adversarial Examples

Xiaohan Fu, Zihan Wang|arXiv (Cornell University)|Oct 4, 2023
Adversarial Robustness in Machine LearningComputer Science6 citations
TL;DR

This paper proposes a white-box, image-based adversarial attack that manipulates multimodal large language models (LLMs) to invoke malicious tool calls—such as deleting emails or booking hotels—using imperceptible visual perturbations. The attack achieves near-perfect success rates (~98%) in triggering attacker-specified tool usage across diverse prompts while maintaining high image similarity (SSIM ~0.9) and preserving natural conversation flow, demonstrating high stealth and generalizability.

ABSTRACT

Large Language Models (LLMs) are being enhanced with the ability to use tools and to process multiple modalities. These new capabilities bring new benefits and also new security risks. In this work, we show that an attacker can use visual adversarial examples to cause attacker-desired tool usage. For example, the attacker could cause a victim LLM to delete calendar events, leak private conversations and book hotels. Different from prior work, our attacks can affect the confidentiality and integrity of user resources connected to the LLM while being stealthy and generalizable to multiple input prompts. We construct these attacks using gradient-based adversarial training and characterize performance along multiple dimensions. We find that our adversarial images can manipulate the LLM to invoke tools following real-world syntax almost always (~98%) while maintaining high similarity to clean images (~0.9 SSIM). Furthermore, using human scoring and automated metrics, we find that the attacks do not noticeably affect the conversation (and its semantics) between the user and the LLM.

Motivation & Objective

  • To address the security gap in multimodal LLMs that are enhanced with tools and vision capabilities, which are vulnerable to attacks that compromise user resource integrity and confidentiality.
  • To develop an attack that is both stealthy—using imperceptible image perturbations—and generalizable across diverse user prompts, unlike prior attacks limited to specific inputs.
  • To demonstrate that adversarial images can induce complex, non-natural-language tool syntax invocations (e.g., API calls) without disrupting the natural flow of user-LLM conversations.
  • To highlight a critical misalignment vulnerability in current LLM alignment definitions, which focus on broad human values but overlook user- and task-specific security risks.
  • To advocate for proactive security measures, such as strict authorization controls on tool access, before open-weight multimodal LLMs are widely deployed.

Proposed method

  • The attack uses gradient-based adversarial training to generate visual perturbations that are imperceptible to humans but cause the LLM to generate specific, attacker-controlled tool invocation syntax.
  • The method is trained in a white-box setting, requiring access to model parameters, to optimize for high success in triggering desired tool calls across varied input prompts.
  • A response utility loss term is introduced to preserve the naturalness and coherence of the LLM’s conversation output, ensuring the attack remains stealthy.
  • The attack is evaluated on both in-domain and out-domain prompts, demonstrating generalization beyond the specific image context.
  • The approach is validated using automated metrics (SSIM, loss) and human evaluation to assess image similarity and conversation quality.
  • The attack is applied to multiple tool types, including email deletion, sending emails, and hotel booking, with varying levels of syntactic complexity.

Experimental results

Research questions

  • RQ1Can visual adversarial examples be used to manipulate multimodal LLMs into executing attacker-specified, complex tool calls with high success and stealth?
  • RQ2To what extent does the attack generalize across different user prompts, including those unrelated to the image content?
  • RQ3How well does the attack preserve the naturalness and utility of the LLM’s conversation response, despite inducing malicious tool usage?
  • RQ4What is the trade-off between attack success rate and image perturbation stealthiness, and can it be tuned for different threat models?
  • RQ5How does the attack perform on out-of-domain examples, and does it transfer effectively to unseen inputs?

Key findings

  • The attack achieves a success rate of approximately 98% in triggering the desired tool invocation on image-related prompts, with a significant drop to around 60–70% on unrelated prompts, indicating strong generalization.
  • The average SSIM between adversarial and clean images is approximately 0.9, confirming high visual similarity and strong stealthiness.
  • The response utility loss metric shows only about 10% reduction in preference compared to clean model generations, indicating minimal degradation in conversation quality.
  • The attack generalizes effectively to out-domain test sets, with success rates remaining high (e.g., 66–98%) across different tool types and unseen prompts.
  • The attack remains effective even when the target tool call syntax is complex or non-natural, such as in the 'send_email_hard' variant, which requires precise API-level formatting.
  • Human evaluation confirms that the conversation remains natural and indistinguishable from benign interactions, even when the LLM performs malicious actions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.