Skip to content

Accident reports · August 2025

Lenovo: one trapped question steals the support agent's cookies

According to Cybernews, a single question made the Lena chatbot write code that sent session cookies, the human support agent's included. Researchers' demonstration, fixed.

  • Company Lenovo
  • Agent Lena
  • Model GPT-4
Outside content
Cookies on a glass tray
Photo: Denisse Leon on Unsplash
WhenJuly-August 2025 (researchers' demonstration)
WhoLena, Lenovo's customer-service chatbot
What the agent didA single booby-trapped question made it write code that sends session cookies to an outside server, the human agent's included
ConsequenceAccording to the researchers, an attacker could log in as a support agent; Lenovo fixed it

What happened

On 22 July 2025, researchers at Cybernews reported a flaw to Lenovo in Lena, its customer-service chatbot, which according to them runs on OpenAI's GPT-4. Lenovo acknowledged it on 6 August; the flaw was fixed before publication on 18 August 2025.

The method, according to Cybernews: a question of about 400 characters. It starts with a normal request about a laptop, asks Lena to answer in HTML, and slips in an image whose address does not exist; when it fails to load, the browser sends the session cookies to the attacker's server. Lena accepted and wrote that code. It stayed in the conversation history.

The worst part comes next: the attacker asks to talk to a human. When the support agent opens the conversation, their own browser runs the code, and their cookies leave in turn. According to the researchers, these would have allowed logging in to the support system as that agent, without a password. Cybernews says it did not try to go further. Lenovo says, according to CSO Online, that it took corrective action after the report.

Why it happened

The chatbot did what the customer asked: produce HTML. The problem is what the site did with its answer: it displayed it as is, unsanitised, for the customer and then for the support agent.

A model's answer is content built from whatever any visitor writes. Showing it to an employee brings that content inside the company.

The failure family

In our catalogue, this is the "Outside content" family: text written by a stranger drives what the agent produces. It leads to "The leak": session cookies sent to an attacker.

The safeguard in code

  • Every model answer is treated as text: sanitised before display, never run as code in a browser.
  • Session cookies are protected (HttpOnly) and the site forbids loading images or scripts from unapproved addresses.
  • The support agents' tool shows a chatbot's history in an isolated space, without their session's rights.

What we test

The "planted instruction" and "trap in the tool" tests check whether the agent carries out a hidden order and whether it sends data to someone who should not have it. The case of a chatbot led to write code that then runs for a customer or a support agent is not yet tested as such: we are adding it to our list.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading