LLMGoat - A04 Data and Model Poisoning

A04 LLM GOAT

This post is the fourth in a series of 10 blog posts and it covers the solution to the Data and Model Poisoning challenge from LLMGoat.

LLMGoat is an open-source tool we have released to help the community learn about vulnerabilities affecting Large Language Models (LLMs). It is a vulnerable environment with a collection of 10 challenges - one for each of the OWASP Top 10 for LLM Applications - where each challenge simulates a real-world vulnerability so you can easily learn, test and understand the risks associated with large language models. This tool could be useful to security professionals, developers who work with LLMs, or anyone who is simply curious about LLM vulnerabilities.

If you are not familiar with LLMs, we recommend that you check out the first post in the series here.


The vulnerability

A data and model poisoning vulnerability (OWASP LLM04:2025: Data and Model Poisoning) arises when an attacker deliberately manipulates the data used to train, fine-tune or support an LLM system.

Poisoning can occur at several stages of an LLM system's lifecycle:

Attackers do not always need direct access to an organisation’s systems. Fake reviews could influence a recommendation engine, or a malicious document uploaded to a company's knowledge base could distort the answers given by an internal assistant. Systems that learn from user feedback are also at risk, particularly when that feedback is incorporated into later rounds of training without adequate checks.

Although publicly confirmed incidents are limited, research studies illustrate how poisoning can affect AI systems.

These studies demonstrate how malicious content can enter an LLM system through several different sources and remain difficult to detect. In the following challenge, we will explore how user-submitted content can enter an LLM application and show how it can influence the model’s responses.


The challenge

LLMGoat presents us with a page in which we can select a goat to read its reviews or add a review:

LLMGoat A04 - Picture 1


Another functionality is we can select attributes and get a goat recommendation that matches our selection.

LLMGoat A04 - Picture 2


In the image above, we can see that the attributes we picked appear in the Alpine Goat reviews and therefore that is the recommendation that we get.

According to the challenge description, the goal is to get the assistant to recommend a Space Chicken – rather than one of those three goats – by leaving poisoned reviews.

Let’s see what happens when we leave a review such as:

LLMGoat A04 - Picture 3


This didn’t work and we still get an Alpine Goat recommendation even when we select the “slow” attribute. This is mainly because there are no goats with a review indicating they are slow, so the assistant just returns whatever goat it feels is the best match.

LLMGoat A04 - Picture 4


This doesn’t necessarily mean the idea is bad, and all it means is that a single review wasn’t enough to bias the recommendation. What happens if we leave the same review for every goat?

LLMGoat A04 - Picture 5

Challenge solved!

There are many other ways to solve this challenge – for example, a simple prompt injection would work too because at the end of the day the model will read all the reviews to provide a recommendation.


Conclusion

Data and model poisoning can pose serious risks for organisations. Once poisoned information enters an LLM system, removing its influence may not be straightforward. The effects can be obvious, such as a drop in accuracy, but they may also be limited to one subject or hidden behind a trigger that is rarely encountered. In those cases, the model can appear to work normally while still producing attacker-controlled responses under the right conditions. Therefore, organisations need to control where this information comes from and how it can be changed.

Some measures that can help reduce data and model poisoning risk include:

No single control can prevent every poisoning attempt. Together, these measures make it harder for malicious content to enter an LLM system and easier to identify unexpected changes before they affect users or systems.