The comparison

Why prompt injection is not like SQL injection

SQL injection has a known cure. The NCSC argues prompt injection has no equivalent, and that treating the two alike leads teams to the wrong defences.

Last reviewed against NCSC, OWASP GenAI Security Project and Microsoft Security Response Center. Sources

Tall blue server rack with glowing status lights

The argument

What the NCSC wrote

On 8 December 2025 the NCSC published a blog post by Dave Chismon, its CTO for Architecture, titled "Prompt injection is not SQL injection (it may be worse)" [1]. Its central claim is that LLMs today keep no enforced separation between what they are told to do and what they are given to read [1]. By contrast, it says SQL injection is cured by parameterised queries [1].

Cloud with a combination lock dial at its centre

The gap

Why the cure does not transfer

Parameterised queries keep data and commands apart. The NCSC says that for an LLM "there is only ever 'next token'", and that this attack may never be closed off as completely as SQL injection can be [1].

Research under way includes detecting attempts, training models to prioritise instructions and marking what is data, and the NCSC notes that all try to impose a distinction the technology does not natively make [1].

A better picture

The confusable deputy

The NCSC suggests thinking of an LLM as an "inherently confusable deputy" [1]. A classic confused deputy flaw can be fixed, whereas an LLM cannot be fully protected, so the goal becomes reducing risk and impact [1].

What it means for a decision

If a system cannot tolerate the residual risk, the NCSC says an LLM may be a poor fit for it [1].

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

History

A warning about adoption

The NCSC notes that SQL injection took about a decade of breaches before better defaults emerged [1]. It warns that embedding generative AI widely without designing for prompt injection could bring a similar wave of breaches [1].

Consequences

Four moves it points to

Read the controls in more detail on the prevention page, or see whether the problem can ever be fixed.

The post makes four recommendations, which the site's plan follows:

  • Raise awareness among developers and risk owners [1]
  • Design on the assumption that the LLM can be confused [1]
  • Make attacks harder, for example by marking data, but avoid deny-lists [1]
  • Log enough to spot suspicious activity [1]

How CyPro can help

Need a hand planning for this?

Understanding the change is one job. Working out what it means for your systems, your suppliers and your roadmap is several more. CyPro's consultants can take any of them on.

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
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
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
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
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
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
Rocket launching from a cloud

Plan ahead

Want a plan for your organisation?

Prompt injection only shows up when someone tries it against your own tools. Penetration testing can probe the AI features you run or build, to see what a hostile instruction could reach.