Module
Module 2 of 6Lesson 2 of 2~19 min

Direct and indirect prompt injection, and system prompt leakage

Lesson 2 of the module "Map the threats" in the course "Secure an AI product: prompt injection, guardrails and the AI Act".

Lesson objective

By the end of this lesson, you will be able to tell direct injection, indirect injection and jailbreaks apart, list every injection entry point in your product, and decide what may or may not go into a system prompt.

Where it fits

Map the threats

Where can an AI product be attacked, and how do you prioritize what you protect?

Lessons in this module

  1. Map the threats with OWASP and keep a risk register
  2. Direct and indirect prompt injection, and system prompt leakage (this lesson)

What you will learn in the course

This lesson is part of the course Secure an AI product: prompt injection, guardrails and the AI Act

  • Map the attack surface of an AI product and its risks with the OWASP Top 10 for LLM Applications 2025, in a prioritized risk register.
  • Analyze a product's direct and indirect prompt injection paths, system prompt leakage and data exfiltration (lethal trifecta).
  • Specify layered guardrails (input, output, rights, human approval, isolation, limits) with testable criteria and their cost.
  • Plan red teaming, abuse monitoring and incident response for an AI feature.
  • Qualify a product under the AI Act (role, risk level, prohibited practices, transparency, timeline) and connect this analysis with the GDPR.