Skip to content

What to look for

Injection

Input that reaches an interpreter as code, such as a SQL query, a shell command, a template, a page in the browser or a prompt.

Start lesson

0 of 7 completed

Reviews are marked on
CWE-89SQL injectionCWE-78OS command injectionCWE-94Code injectionCWE-502Deserialisation of untrusted dataCWE-79Cross-site scriptingCWE-1427Improper neutralisation of input used for LLM promptingLLM01Prompt injection
  1. 1
    SQL injection

    A website that joins a visitor's text into a SQL query lets an attacker change the query. The fix sends the text to the database separately.

    Open the lesson

    Listen to an AI summary of SQL injection

    0:00 / 0:34
  2. 2
    Command injection

    A website can ask its server to run another program. Text from outside, joined into that instruction, can make the server run a program an attacker chose.

    Open the lesson

    Listen to an AI summary of Command injection

    0:00 / 0:34
  3. 3
    Other interpreters

    A database is one of many programs that follow instructions in text. Input joined into the text can add instructions, and each fix keeps the input apart from the instructions.

    Open the lesson

    Listen to an AI summary of Other interpreters

    0:00 / 0:38
  4. 4
    Insecure deserialisation

    A program can save data and load the data back later. Some ways of loading run code that an attacker put in the saved data.

    Open the lesson

    Listen to an AI summary of Insecure deserialisation

    0:00 / 0:41
  5. 5
    Cross-site scripting

    A website that writes a visitor's text into a page can make a browser run an attacker's code. The fix makes the browser show the text as text.

    Open the lesson

    Listen to an AI summary of Cross-site scripting

    0:00 / 0:34
  6. 6
    Unsafe sinks in the browser

    Code in a web page can write text from a web address into the page. The browser can then run the text as code.

    Open the lesson

    Listen to an AI summary of Unsafe sinks in the browser

    0:00 / 0:34
  7. 7
    Prompt injection

    A chat assistant on a website can follow an instruction that an attacker typed into a message. A reviewer looks for checks in the code around the assistant.

    Open the lesson

    Listen to an AI summary of Prompt injection

    0:00 / 0:35