AI worms show how autonomous agents can spread risk
Terminator AI security By What The Future Newsroom · March 1, 2024 · 5 min read

AI worms show how autonomous agents can spread risk

Researchers created Morris II, a generative AI worm, in test environments to show how connected AI agents could spread malicious prompts. The demonstration targeted a generative AI email assistant, exposing risks around prompt injection, RAG, autonomous actions, spam, and data theft.

Generative AI is moving from chat windows into systems that can act for users. The same shift that lets AI agents send emails, book appointments, or connect to outside tools also creates new paths for attacks.

“The story centers on autonomous AI agents spreading malicious prompts, enabling data theft, malware, and new cyberattack paths.”Why it scores Terminator

A research team has demonstrated a generative AI worm called Morris II, designed to show how malicious instructions could spread across connected AI systems. The work was done in test environments, not against a publicly available email assistant, but the warning is direct: AI agents that read, write, retrieve, and forward information can become part of the attack surface.

What the Morris II demonstration showed

Ben Nassi, Stav Cohen, and Ron Bitton created Morris II as a reference to the Morris computer worm that disrupted the internet in 1988. Their work focused on a generative AI email assistant that could send and receive messages while using ChatGPT, Gemini, and the open source LLM LLaVA.

The researchers say Morris II is a generative AI worm because it can move from one system to another. In the process, it can potentially steal data or deploy malware. Nassi described the risk this way: “It basically means that now you have the ability to conduct or to perform a new kind of cyberattack that hasn't been seen before.”

The demonstration showed an AI email system forwarding messages multiple times. The researchers also said they could extract information from emails, including “names,” “telephone numbers,” “credit card numbers,” “SSN,” and “anything that is considered confidential.”

The research also broke some security protections in ChatGPT and Gemini, according to the source article. The researchers framed the issue as a warning about “bad architecture design” in the wider AI ecosystem, not simply a flaw in one product.

How a prompt becomes a worm

Most generative AI tools operate through prompts: instructions that tell the model what to answer, create, summarize, or do next. Those instructions are not always harmless. Jailbreaks can push a model away from its safety rules, while prompt injection attacks can hide instructions inside material the model is asked to process.

For Morris II, the researchers used what they call an “adversarial self-replicating prompt.” The idea is simple but dangerous: the prompt makes the AI system produce another prompt inside its own response. That gives the malicious instruction a way to reproduce as the system replies, stores, retrieves, or forwards content.

The researchers compared the concept broadly to SQL injection and buffer overflow attacks. In each case, an attacker takes advantage of the way a system handles input. With generative AI, the input can be ordinary-looking text, retrieved email content, or even an image that contains hidden instructions.

The team tested two routes:

  • A text-based self-replicating prompt placed in an email.
  • A self-replicating prompt embedded inside an image file.

Both approaches matter because modern large language models are becoming multimodal. They increasingly handle text, images, and video, which means malicious instructions do not have to appear only as visible text in a message.

Why email assistants are a useful warning case

The email scenario matters because it combines several risky features in one place. An AI assistant may receive outside messages, retrieve stored information, summarize or draft replies, and then send new messages to other people. If those steps are connected without strong boundaries, a malicious prompt can travel through normal workflow.

In one test, the researchers sent an email containing the adversarial text prompt. That prompt “poisons” the database of an email assistant using retrieval-augmented generation, or RAG. RAG lets an LLM pull in additional data from outside its core system.

When the poisoned email is retrieved in response to a user query and sent to GPT-4 or Gemini Pro to generate an answer, Nassi says it “jailbreaks the GenAI service.” The result can be theft of data from emails. Nassi also says, “The generated response containing the sensitive user data later infects new hosts when it is used to reply to an email sent to a new client and then stored in the database of the new client.”

The image-based method shows a different version of the same problem. An image with an embedded malicious prompt can cause the email assistant to forward the message to others. Nassi says, “By encoding the self-replicating prompt into the image, any kind of image containing spam, abuse material, or even propaganda can be forwarded further to new clients after the initial email has been sent.”

What OpenAI, Google, and other researchers said

The researchers reported their findings to Google and OpenAI. An OpenAI spokesperson said, “They appear to have found a way to exploit prompt-injection type vulnerabilities by relying on user input that hasn't been checked or filtered,” adding that OpenAI is working to make its systems “more resilient” and that developers should “use methods that ensure they are not working with harmful input.”

Google declined to comment on the research. Messages Nassi shared with WIRED showed that the company’s researchers requested a meeting to discuss the subject.

Other security researchers treated the work as a serious signal, even though the demonstration happened in a controlled environment. The risk becomes more important when AI applications can take actions on behalf of users, such as sending emails or booking appointments, and when multiple AI agents are linked together.

Sahar Abdelnabi, a researcher at the CISPA Helmholtz Center for Information Security in Germany, had worked on early demonstrations of prompt injections against LLMs in May 2023 and had highlighted that worms may be possible. Abdelnabi said, “I think the idea of spreading injections is very plausible,” and added, “It all depends on what kind of applications these models are used in.”

The Morris II researchers wrote that they expect generative AI worms to appear in the wild in the next two to three years. Their paper says, “GenAI ecosystems are under massive development by many companies in the industry that integrate GenAI capabilities into their cars, smartphones, and operating systems.”

How developers can reduce the risk

The source article points to traditional security approaches as part of the answer. Adam Swanda, a threat researcher at AI enterprise security firm Robust Intelligence, said, “With a lot of these issues, this is something that proper secure application design and monitoring could address parts of.”

Swanda also warned against trusting model output inside applications: “You typically don't want to be trusting LLM output anywhere in your application.” That principle is especially important when an AI system can both consume untrusted input and take an action based on its own generated response.

Human approval is another major boundary. Swanda said, “You don't want an LLM that is reading your email to be able to turn around and send an email. There should be a boundary there.”

The larger lesson is that AI agent security depends on architecture, not only model behavior. If an AI system can retrieve unfiltered input, generate instructions, store those instructions, and act on them automatically, then the application itself may help the attack spread. Morris II shows why developers building autonomous AI tools need to treat prompts, outputs, images, and retrieved content as possible attack channels.

← Back to the wire

Read next