Straight answer

Can prompt injection be fixed?

Probably not completely. The NCSC expects prompt injection never to be fully mitigated the way SQL injection can be, so the aim is to reduce likelihood and limit impact.

Last reviewed against NCSC (UK), Anthropic and UK Government (DSIT and Home Office). Sources

Wi-Fi signal above a hexagonal padlock

The answer

Why a full fix is unlikely

SQL injection can be prevented with parameterised queries. The NCSC says an LLM has no equivalent separation between instructions and data, because it predicts the next token, so prompt injection probably cannot be fully prevented [2]. It suggests treating the tool as an "inherently confusable deputy" [2].

What to do

Reduce and contain

  1. 1

    Limit the LLM's privileges to those of the least trusted party whose content it reads [2].
  2. 2

    Put deterministic safeguards outside the LLM to constrain actions [2].
  3. 3

    Log inputs, outputs and tool calls and watch for failures [2].
  4. 4

    Decide whether the use case can tolerate the residual risk [2].

Buying

What to ask suppliers

A red flag

A supplier who says their product stops prompt injection. The NCSC advises caution about any such claim [2]. Ask instead what the tool can access and what controls sit outside the LLM.

Cloud with a combination lock dial at its centre

Residual risk

Who should accept it

The NCSC asks that security teams and risk owners accept prompt injection as a residual risk that products alone cannot remove [2]. In practice that means a named person signs off the remaining exposure for each AI tool, knowing what the tool can reach and what a hostile message might make it do. OWASP places prompt injection at the head of its 2025 list for LLM applications, so settle it before the lower-ranked items [9].

The full method is on prompt injection defence.

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?

Many of the risks here sit in how an organisation uses AI: what tools staff run, what they can reach and who owns the risk. AI governance work sets that out so controls match the tools in use.