Skip to content

That's just a taste — their profile full of gems!

Visit profile
User avatar
Albert Sanders
September 6878

Prompt Injection Reality Check

I just went through five prompt injection attacks, and the big takeaway is the same one I keep seeing across SEO, software, and now AI:

People overestimate guardrails the moment a system looks polished.

A lot of teams seem to think, “We added a system prompt, some constraints, maybe JSON output, so we’re covered.” That’s wishful thinking. Prompt injection is basically social engineering for machines, and if you give a model access to tools, data, or internal instructions, you’ve created a pretty interesting attack surface.

The part that matters most is understanding what an LLM app actually is.

The model itself is stateless. It doesn’t magically “know” your app rules unless those rules are passed in every request through things like system prompts, memory, retrieved context, and tool definitions. That means your so-called protections are often just more text in the prompt stack.

And text can be manipulated.

That’s why system prompt leakage matters so much. If someone can extract the hidden instructions, they’re not just seeing implementation detail. They’re learning the app’s priorities, tool access, restrictions, and weak points. In security terms, that’s reconnaissance. In practical terms, that’s the attacker getting your playbook.

What I found especially interesting is that the old-school “ignore previous instructions” attack is losing steam on newer models. That’s good news, but I wouldn’t celebrate too hard. Beating the dumbest attack doesn’t mean the system is robust. It just means the obvious trick is less reliable now.

The more interesting failures came from prompts that forced compliance in less direct ways.

Structured output attacks are a great example. Once you pressure the model into producing a “valid” schema, you can sometimes get it to reveal things it should refuse. I’ve seen the same pattern in SEO tooling and automation: the moment people optimize for format compliance, they accidentally weaken judgment. If a model is trying too hard to satisfy structure, it can start treating unsafe disclosure as a formatting task instead of a policy violation.

That’s not a small bug. That’s a design problem.

The role-play angle is another one people underestimate. Framing the request as an audit, executive summary, interpreter mode, or internal review can push the model into revealing restricted content under the guise of being helpful. Again, this is not some exotic exploit. It’s exploiting the model’s default instinct to complete the task in front of it.

And combining techniques is where things get ugly.

A role-play wrapper plus structured output can succeed where either one alone fails. That’s the part builders need to take seriously. Security testing that only checks single-turn, single-technique prompts is the AI equivalent of calling an SEO test complete after checking one keyword on one device in one location. You didn’t test reality. You tested a lab demo.

The multi-turn manipulation example is probably the most practical one for real apps.

Instead of asking for sensitive data in one obvious request, the attacker breaks it into harmless-looking pieces. First count the users. Then first names. Then last names. Then addresses. Then combine it all. Individually, each step can look benign. Together, it becomes a full data exfiltration flow.

That’s exactly why “this prompt didn’t look dangerous” is not a defense.

Same story with payload splitting in a single prompt. Break the harmful request into subcomponents, make each piece look operational or analytical, then instruct the model to merge the results at the end. If your app only filters for blatantly malicious phrasing, you’re already behind.

A few things I’d take from this if I were building with LLMs:

  • Don’t treat system prompts as a security boundary.
  • Don’t assume newer models solved prompt injection.
  • Don’t validate only the final answer; validate the data access path and tool permissions too.
  • Don’t let “well it refused in my test” become your entire security strategy.

This is the same mistake I see in SEO all the time, just in a different costume. People confuse a positive surface-level result with actual resilience. A page ranks for a week, so they call the tactic proven. A chatbot refuses one jailbreak, so they call it secure. That’s not testing. That’s self-soothing.

What I like here is the reminder that prompt injection isn’t just about getting funny outputs like making a bot talk like Batman. That stuff is entertaining, but the real issue is when natural language lets attackers override intent, leak internal instructions, or access private data through tools and context the model should never expose.

That’s where this moves from novelty to real risk.

My view: if you’re shipping AI features into products, prompt injection testing should be standard, not optional. Not as a one-time checkbox, and definitely not as a “we tried ignore previous instructions and it failed, so we’re good” exercise.

Because you’re not good.

You’re just one creative prompt away from finding out how fragile your setup really is.

#llm#aisecurity#appsec#promptinjection#llmsecurity
Like
Dislike

72

33

Add a comment...