New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group).Get the weekly email
// Analysis
LoginTrap Coaxes Web Agents into Phishing Logins
Published: Thu, 06 Aug 2026 • By Elise Veyron
Agents
Researchers show a task-agnostic prompt-injection attack that makes Large Language Model (LLM) web agents initiate logins and leak sensitive data. LoginTrap works across models and agent designs, with 93% login entry and 86% end-to-end success in tests on 80 cloned sites and 1,175 tasks. Authentication is the weak seam.
Web agents powered by Large Language Models (LLMs) are getting good at clicking through real sites to finish jobs we would rather not do. That convenience hides a hard boundary: login. The minute an agent believes it must sign in, you are close to credential exposure or account data leaks. New research shows that boundary is far softer than many assume.
How it works
The team introduces LoginTrap, a black-box, phishing-style indirect prompt injection. The attacker only controls the page the agent sees and the downstream login flow. They clone a legitimate page, inject a targeted prompt in a popup that claims login is needed to continue, and route the agent to an attacker-hosted login page with fields for sensitive data.
Crucially, the wording is not generic. A Fuzzing" target="_blank" rel="noopener" class="term-link">fuzzing-inspired pipeline uses an LLM to summarise the page, propose page-specific inducements, test them with shadow LLMs, and mutate until the agent buys it. No knowledge of the user’s task or the agent’s internals is required. The result feels plausible to the agent: of course a shopping cart or itinerary needs an account.
What they saw
Across LLM backbones, agents clicked into the fake login 93% of the time and leaked data end to end 86% of the time. The attack generalised across three agent architectures (Browser-Use, LiteWebAgent, Skyvern), with login entry roughly 84% to 94% and end-to-end success roughly 68% to 89%, averaging about 79% across architectures. Every one of the 80 cloned pages proved exploitable within the test budget over 1,175 task instances.
Model behaviour varied. Some backbones, such as Gemini 3 Flash and Claude Sonnet 4, were more likely to carry login entry through to form completion. Others, including GPT-4o and DeepSeek, showed a bigger gap between clicking and actually submitting data, often because they paused or backtracked after navigation. Domains like Shopping and Travel made the ruse easier to justify mid-task.
The limitations are standard lab caveats: cloned pages, a controlled login flow, fixed interaction budgets, and action-based labels rather than reading agent internals. The injection generator itself used an LLM, which is realistic for attackers with commodity tools.
This is not just a technical quirk; it is an authentication governance problem. If a delegated agent decides when to log in, who authorises that step, and how is intent bound to the action? In regulated contexts such as finance or health, where credential handling and consent are not optional niceties, that question gets sharper. The paper’s message lands plainly: until agents are authentication-aware by design, “login” is an attack surface, not a mere button. The open issues now are where to enforce that boundary, how to make it auditable, and who carries liability when an automated click crosses the line.
Additional analysis of the original ArXiv paper
📋Original Paper Title and Abstract
LoginTrap: Uncovering Task-Agnostic Phishing-Style Indirect Prompt Injection Attacks against LLM-based Web Agents
Authors: Longtao Guo, Zelin Zhang, Kaifeng Huang, and Yang Shi
LLM-based web agents automate user tasks by observing webpages and executing browser actions on behalf of users. As these agents operate on real web services, login becomes a sensitive authentication boundary because it involves credentials and sensitive information. Existing work shows that malicious webpage content can manipulate web agent actions, but it has not fully examined whether such content can induce login and cause end-to-end private data leakage. We study this attack surface and present LoginTrap, a task-agnostic login-inducing attack against LLM-based web agents. LoginTrap assumes a black box attacker that controls the webpage context and the induced login flow without knowing the user task or web agent internals. Under this threat model, LoginTrap uses webpage context to generate page-specific indirect injections through a fuzzing-inspired process, making login appear as a plausible prerequisite for continuing the task and guiding the agent to a controlled login page. We conduct a comprehensive analysis of LoginTrap across realistic web agent executions. The results show that LoginTrap reaches 86\% average end-to-end attack success across LLM backbones and remains effective across agent architectures and defenses. These findings identify login inducement as a systematic authentication boundary risk and motivate further research on authentication-aware defenses for web agents.
🔍ShortSpan Analysis of the Paper
Problem
This paper studies whether untrusted webpage content can coerce LLM-based web agents to initiate login flows and thereby leak sensitive information. Login is identified as a common, security-sensitive boundary because it handles credentials and account data, yet many user tasks do not inherently require authentication. Prior prompt-injection work showed agents can be manipulated, but did not fully explore whether page-level content alone can induce a login as a plausible intermediate step and cause end-to-end credential or private-data leakage.
Approach
The authors design LoginTrap, a task-agnostic, black-box attack in which the adversary controls only the webpage observation and the subsequent login flow. The attacker clones real webpages, inserts a controlled popup containing a page-specific login-inducing statement and a forged login entry, and hosts an attacker-controlled login page that requests sensitive fields. Page-specific injection text is generated by a fuzzing-inspired pipeline that uses an LLM to extract page summaries, propose candidate statements, evaluate candidates with shadow LLMs, and mutate failed candidates. Evaluation uses a controlled local environment with 80 cloned webpages and 1,175 task instances drawn from a real-world benchmark. Metrics are Login Entry Rate (LER), Attack Success Rate (ASR, end-to-end leakage), and Page Exploitability Rate (PER). The generation pipeline used GPT-4o; evaluated web agents used different LLM backbones and three representative agent architectures. Each run used a fixed interaction step budget and action-based labelling of clicks and form inputs.
Key Findings
High induction and leakage: Across LLM backbones LoginTrap achieved an average Login Entry Rate of 93% and an average end-to-end Attack Success Rate of 86%, indicating that agents frequently click the forged login and often proceed to submit sensitive data.
Broad transferability: The attack generalises across agent architectures. In architecture experiments (Browser-Use, LiteWebAgent, Skyvern) LER ranged roughly 84% to 94% and ASR ranged roughly 68% to 89%, with an overall reported average attack success of about 79% across architectures.
Page-level exploitability: Every tested webpage was exploitable within the evaluation budget, so PER reached 100% across backbones; however, the number of attempts to first success varied by model and domain, with some models succeeding on the first attempt and others requiring more tries.
Variation by model and domain: Some models (Gemini 3 Flash, Claude Sonnet 4) more reliably convert login entry into form completion; GPT-4o and DeepSeek showed larger gaps between LER and ASR, often due to interruptions after navigation. Domains with account-related cues, such as Shopping and Travel, made the induced login easier to reconcile with task progress.
Limitations
The evaluation used cloned webpages and a local controlled login flow, a fixed interaction step budget, and action-based labelling rather than internal model traces. The attacker model is conservative in that it cannot modify the agent runtime or observe internals, but the injection generator itself used an LLM. Results therefore reflect a reproducible, laboratory-style threat model and may vary in wild deployments.
Implications
Offensively, an adversary who can control webpage content can craft task-agnostic injections that make login appear necessary, route agents to attacker-hosted login pages, and harvest credentials or other background data at scale. The vulnerability spans multiple LLM backbones and agent architectures, so attackers need not rely on knowledge of the user task or agent internals. This elevates login inducement into a practical phishing-style vector against delegated automation.
- It exposes a new indirect prompt injection risk for LLM-based web agents that parse HTML through the accessibility tree, where hidden triggers in HT...
- Reveals a new attack surface where web-use agents can be steered by malicious content they encounter online, exploiting gaps in LLMs’ reasoning.
- I...
- It shows a realistic privacy-leak path in black-box LLM chatbots where untrusted external content and web-tool use can be manipulated to reveal data...
- It shows how simple prompt tricks can make LLM-powered agents leak personal data observed during their work, even when safety measures are in place....
- Core idea: embedded hints in automatically generated URL previews can nudge an agent to make outbound requests that leak runtime context, even if th...
- Highlights a new, more dangerous attack class: backdoors planted in one step (a file or tool output) that Activate later to give an attacker persist...
- It studies how external content fed to tool-using LLMs can be weaponized through indirect prompt injections, a real risk in AI-enabled workflows.
- ...
- It reveals a new attack class, “plan injection,” that corrupts how autonomous web agents store and use memory to plan actions, bypassing many prompt...
- It shows backdoor attacks on LLM-based agents can affect not just outputs but also intermediate reasoning, with triggers hidden in queries or in obs...
Get the weekly digest
The few AI-security papers that matter, with the practitioner takeaway. No spam.