Manipulating LLM Web Agents with Indirect Prompt Injection Attack via HTML Accessibility Tree

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Johnson, Sam, Pham, Viet, Le, Thai
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915401104883712
author Johnson, Sam
Pham, Viet
Le, Thai
author_facet Johnson, Sam
Pham, Viet
Le, Thai
contents This work demonstrates that LLM-based web navigation agents offer powerful automation capabilities but are vulnerable to Indirect Prompt Injection (IPI) attacks. We show that adversaries can embed universal adversarial triggers in webpage HTML to hijack agent behavior that utilizes the accessibility tree to parse HTML, causing unintended or malicious actions. Using the Greedy Coordinate Gradient (GCG) algorithm and a Browser Gym agent powered by Llama-3.1, our system demonstrates high success rates across real websites in both targeted and general attacks, including login credential exfiltration and forced ad clicks. Our empirical results highlight critical security risks and the need for stronger defenses as LLM-driven autonomous web agents become more widely adopted. The system software (https://github.com/sej2020/manipulating-web-agents) is released under the MIT License, with an accompanying publicly available demo website (http://lethaiq.github.io/attack-web-llm-agent).
format Preprint
id arxiv_https___arxiv_org_abs_2507_14799
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Manipulating LLM Web Agents with Indirect Prompt Injection Attack via HTML Accessibility Tree
Johnson, Sam
Pham, Viet
Le, Thai
Cryptography and Security
Artificial Intelligence
This work demonstrates that LLM-based web navigation agents offer powerful automation capabilities but are vulnerable to Indirect Prompt Injection (IPI) attacks. We show that adversaries can embed universal adversarial triggers in webpage HTML to hijack agent behavior that utilizes the accessibility tree to parse HTML, causing unintended or malicious actions. Using the Greedy Coordinate Gradient (GCG) algorithm and a Browser Gym agent powered by Llama-3.1, our system demonstrates high success rates across real websites in both targeted and general attacks, including login credential exfiltration and forced ad clicks. Our empirical results highlight critical security risks and the need for stronger defenses as LLM-driven autonomous web agents become more widely adopted. The system software (https://github.com/sej2020/manipulating-web-agents) is released under the MIT License, with an accompanying publicly available demo website (http://lethaiq.github.io/attack-web-llm-agent).
title Manipulating LLM Web Agents with Indirect Prompt Injection Attack via HTML Accessibility Tree
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2507.14799