Hidden instructions

Indirect prompt injection: when the content is the attack

Indirect prompt injection hides instructions in content an AI tool is asked to read. The person using the tool may never see them, which makes inbound content the main route to defend.

Last reviewed against NCSC (UK), OWASP Gen AI Security Project and UK Government (DSIT). Sources

Tangled green cable between a round badge and an arrow tip

The route

Content the model ingests

OWASP separates direct injection, where the user's own input changes behaviour, from indirect injection, where the model ingests external content such as web pages or files that contain instructions it then follows [4]. It also flags multimodal risk, where instructions hidden in one data type, such as an image, affect how the model handles another [4].

Examples

What OWASP describes

OWASP lists nine example scenarios. These are the ones most relevant to a UK organisation [4].

Cloud above a green shield with a padlock beside a stack of blue servers

Hidden web text

A web page being summarised carries hidden instructions that cause private conversation data to be exfiltrated [4].

Factory buildings linked through a hub to a phone showing a fingerprint and shield

Poisoned documents

A poisoned document in a retrieval repository skews what an assistant says [4].

Two server towers, one on fire, linked by a cycle of arrows to a laptop

Email assistants

OWASP cites CVE-2024-5184 as an exploitation of an LLM-powered email assistant [4].

Businessman with empty pockets imagining stacks of coins and banknotes

Hidden in applications

A job applicant's resume triggers an instruction in an employer's AI screening, either knowingly or not [4].

Dark blue arched badge with a large green and blue tick across it

Why it matters

The user is not the attacker

Staff do not need to do anything wrong. They ask a tool to summarise an email or a page and the attacker's text does the rest. EchoLeak showed the pattern in a production product: a crafted email led Microsoft 365 Copilot to leak data with no user action [7]. The EchoLeak page covers it.

Where to look

Check these in your estate

Review where AI tools ingest content you do not control:

  • Shared mailboxes and email summarisation features
  • Browser assistants and agents that open web pages [9]
  • Document stores that an assistant searches [4]
  • Candidate and customer uploads processed by AI [4]

What helps

OWASP advises segregating and clearly labelling untrusted external content, enforcing least privilege and requiring human approval for high-risk actions [4]. Labelling helps but is not a guarantee, so keep the limits as well [1].

How CyPro can help

Need a hand with any of this?

Patching is one job. Keeping a vulnerable system safe until it is patched, and proving it, is several more. CyPro's consultants, testers and SOC analysts can take any of them off your plate.

Scanner checking internet-facing systems for weaknesses

Vulnerability scanning

Find every internet-facing system you run, including the forgotten ones, and see which are still on a vulnerable build.

See the scanning service
Cyber security consultants planning hardening work

Hardening and segmentation

Our consultants put the controls in place that limit the damage when something is missed: firewall rules, network isolation and tighter admin access.

More on cypro.co.uk
Security analysts monitoring systems around the clock

24/7 security monitoring

Our SOC analysts watch your systems day and night for the signs of an attack in progress: unexpected processes, new outbound connections, logins that do not fit.

More on cypro.co.uk
Penetration tester probing an application for weaknesses

Penetration testing

A focused test of your systems and the controls around them, so you know they hold before an attacker finds out for you.

More on cypro.co.uk
Incident responders containing an attack

Incident response

If you may already be compromised, our responders contain it, preserve the evidence, find out what was touched and get you running again safely.

More on cypro.co.uk
Security lead advising a board

Fractional CISO for the board

A senior security lead who advises the board on what to fix first, what to accept and what to tell customers, and owns the decision record.

More on cypro.co.uk
Rocket launching from a cloud

Know your exposure

Not sure you are protected?

Prompt injection cannot be patched away, so the useful question is how far a manipulated tool could reach. Testing your AI-connected systems the way an attacker would shows where the limits on data and actions need tightening.