TOPIC 03/1918 MINNOT STARTED

Server-side vulnerabilities: SQL injection, SSRF, path traversal and command injection

Four weaknesses where the server does something a stranger typed. Learn what each is, where to look for it, and the safe, small check that stops at the first sign.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: whispering a new instruction into the order slip. A waiter writes your order on a slip. The kitchen follows the slip. Now someone whispers an extra line onto the slip. The kitchen follows the stranger, not the waiter.

Daily List is a to-do list app. Some features make the server do things. One fetches a calendar from a web address that a user types. One lets a user download a file by its name. One may call a tool on the server to resize a picture.

Tom, the tester, asks one question about each. Does the server do exactly what the person typed? He tests only the test copy, with .

The weaknesses have names. means making the server send a request to an unintended destination or in an unintended way. means a file name that opens a file outside its folder. Command injection means typed text that changes a command the server runs. Database injection is a fourth, from an earlier lesson.

The picture has a limit. A kitchen has one slip. A server has many places where text turns into action.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PLAIN WORDS · 3 in this section
resize
change how big something is
unintended
not meant to happen
traversal
moving through a path, such as climbing out of folders

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Making sure the server does only what the system meant, and not what a stranger typed.

  1. Find where text becomes action
  2. Use a team-made test item
  3. Stop at the first sign
  4. Report with steps
The server must follow the waiter, not the whisper

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The order slipThe request to the server
The extra whispered lineText from a stranger treated as an instruction
The kitchenThe server and what it can reach
A rule that the kitchen follows only the waiterThe check that separates data from commands

WHERE THIS PICTURE STOPS

  • A kitchen has one slip. A server has many places where text turns into action.
  • A whisper is heard by one person. A request can be sent by anyone on the internet.
  • A kitchen would notice an odd order. A server follows the slip without thought.

HOOK

The server must follow the waiter, not the whisper.

REMEMBER IT THIS WAY

A chunk: a long list grouped so it is easier to hold.

Look for four places where typed text turns into action: a fetched address, a file name, a command and a database query.

What each part of the trick stands for
In the trickWhat it stands for
Fetched addressserver-side request forgery
File namepath traversal
Commandcommand injection
Database querydatabase injection

TELL A FRIEND

The kitchen follows the order slip. If a stranger whispers an extra line onto the slip, the kitchen follows the stranger.

OFTEN MIXED UP WITH Web vulnerability classes: XSS, CSRF, CORS and clickjacking. The web lesson is about tricks that run in the browser. This lesson is about tricks that run on the server.

Sources & standards — 5 sources
  1. Market practice

    Server-Side Request Forgery Prevention Cheat Sheet ↗ — OWASP · Actual official sheet: known-destination Case1 and arbitrary-external Case2, application/network controls, original figures and DNS/redirect/protocol considerations; reviewed6 November2026.

    Known-destination and arbitrary-external destination cases; application and network controls; redirects, protocols, resolution and connection binding. Original common-flow and Case1 network figures are CC-BY-SA4.0 source material. · Checked 2026-11-06

    Actual primary source sections reviewed on 6 November 2026 for the V34 Security domain analysis. The source describes guidance for its own context, not a guarantee that a test proves complete security. No source example was executed.

  2. Market practice

    OS Command Injection Defense Cheat Sheet (Open Worldwide Application Security Project) ↗ — Open Worldwide Application Security Project · Complete official sheet: avoid shell commands when suitable APIs exist; separate arguments, validate commands/arguments and use least privilege; read6 November2026.

    Defines the weakness as building a system command from outside input without cleaning out special characters, and says the first defence is to avoid calling operating system commands at all and use library functions instead. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Read complete official repository sheet. Prefer suitable library APIs; separate executable/arguments and validate commands and arguments. Shell separation alone does not prevent argument injection.

  3. Market practice

    Structured Query Language (SQL) injection prevention cheat sheet (Open Worldwide Application Security Project) ↗ — Open Worldwide Application Security Project (OWASP) · Complete official sheet: value binding, safe dynamic query structure and least privilege; read6 November2026.

    Per the search excerpt, parameterized queries are the main defence because the database can tell code from data. Escaping all input is strongly discouraged. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Read complete official repository sheet. Bind values; dynamic SQL structure requires separate safe handling, and object authorisation remains distinct.

  4. Market practice

    Open Worldwide Application Security Project cheat sheet series: input validation ↗ — Open Worldwide Application Security Project (OWASP) · Complete official sheet: syntax/semantic checks, valid Unicode/punctuation, server-side enforcement and context-specific handling; read6 November2026.

    The Open Worldwide Application Security Project's cheat sheet on input validation. Cited for three points: check both the syntax and the meaning of a value, reject invalid input with a clear error, and check data again where it crosses a trust boundary. · Checked 2026-10-18

    Search excerpt, page not opened: returned by WebSearch on 2026-10-18. The excerpts did not use the phrase as early as possible in the data flow, so this site does not quote it. It is guidance for software in general, not for payments.

    V34 review, 6 November 2026: Read complete official repository sheet. Syntax, semantic business rules, server checks and safe handling of legitimate Unicode/punctuation have distinct roles.

  5. Market practice

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), entry 22 of the Common Weakness Enumeration ↗ — MITRE · Current CWE5.0 page: description, restricted-directory resolution and relevant mitigations including canonicalisation and fixed input mappings; reviewed6 November2026.

    Defines the weakness: a file path is built from outside input meant to stay under a restricted folder, but special path parts let it point outside. Advises mapping fixed inputs, such as numbers, to real file names and refusing the rest. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: CWE version 4.20 page. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Opened actual current CWE-22 page, marked CWE5.0: description, restricted-directory resolution and relevant mitigation guidance including canonicalisation and fixed-value mappings. Earlier4.20 source scope remains historical.

PRACTISE AND KEEP

Sources for this topic — 8 sources
  1. Market practice

    What is SSRF (server-side request forgery)? (PortSwigger Web Security Academy) ↗ — PortSwigger · Server-side request forgery: making the server-side application send a request to an unintended destination, often an internal-only service (search excerpt, page not opened)

    Defines server-side request forgery as making the server-side application send a request to an unintended destination, often an internal-only service. Vendor teaching site, free. Practitioner or vendor guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Server Side Request Forgery, risk 7 in the 2023 Open Worldwide Application Security Project application programming interface Security Top 10 ↗ — Open Worldwide Application Security Project · The flaw occurs when an API fetches a remote resource without validating the web address a user supplied (search excerpt, page not opened)

    Says the flaw occurs when an application programming interface (API) fetches a remote resource without validating the web address a user supplied, even behind a firewall or private network. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), entry 22 of the Common Weakness Enumeration ↗ — MITRE · Current CWE5.0 page: description, restricted-directory resolution and relevant mitigations including canonicalisation and fixed input mappings; reviewed6 November2026.

    Defines the weakness: a file path is built from outside input meant to stay under a restricted folder, but special path parts let it point outside. Advises mapping fixed inputs, such as numbers, to real file names and refusing the rest. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: CWE version 4.20 page. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Opened actual current CWE-22 page, marked CWE5.0: description, restricted-directory resolution and relevant mitigation guidance including canonicalisation and fixed-value mappings. Earlier4.20 source scope remains historical.

  4. Market practice

    OS Command Injection Defense Cheat Sheet (Open Worldwide Application Security Project) ↗ — Open Worldwide Application Security Project · Complete official sheet: avoid shell commands when suitable APIs exist; separate arguments, validate commands/arguments and use least privilege; read6 November2026.

    Defines the weakness as building a system command from outside input without cleaning out special characters, and says the first defence is to avoid calling operating system commands at all and use library functions instead. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Read complete official repository sheet. Prefer suitable library APIs; separate executable/arguments and validate commands and arguments. Shell separation alone does not prevent argument injection.

  5. Market practice

    Structured Query Language (SQL) injection prevention cheat sheet (Open Worldwide Application Security Project) ↗ — Open Worldwide Application Security Project (OWASP) · Complete official sheet: value binding, safe dynamic query structure and least privilege; read6 November2026.

    Per the search excerpt, parameterized queries are the main defence because the database can tell code from data. Escaping all input is strongly discouraged. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Read complete official repository sheet. Bind values; dynamic SQL structure requires separate safe handling, and object authorisation remains distinct.

  6. Market practice

    OWASP Top Ten Proactive Controls 2024, C10: Stop Server-Side Request Forgery ↗ — Open Worldwide Application Security Project · Defences against server-side request forgery: validate input and check outgoing request targets against an allow-list (search excerpt, page not opened)

    Lists defences: validate input, check outgoing request targets against an allow-list and keep servers able to reach only what they need. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  7. Market practice

    Server-Side Request Forgery Prevention Cheat Sheet ↗ — OWASP · Actual official sheet: known-destination Case1 and arbitrary-external Case2, application/network controls, original figures and DNS/redirect/protocol considerations; reviewed6 November2026.

    Known-destination and arbitrary-external destination cases; application and network controls; redirects, protocols, resolution and connection binding. Original common-flow and Case1 network figures are CC-BY-SA4.0 source material. · Checked 2026-11-06

    Actual primary source sections reviewed on 6 November 2026 for the V34 Security domain analysis. The source describes guidance for its own context, not a guarantee that a test proves complete security. No source example was executed.

  8. Market practice

    Open Worldwide Application Security Project cheat sheet series: input validation ↗ — Open Worldwide Application Security Project (OWASP) · Complete official sheet: syntax/semantic checks, valid Unicode/punctuation, server-side enforcement and context-specific handling; read6 November2026.

    The Open Worldwide Application Security Project's cheat sheet on input validation. Cited for three points: check both the syntax and the meaning of a value, reject invalid input with a clear error, and check data again where it crosses a trust boundary. · Checked 2026-10-18

    Search excerpt, page not opened: returned by WebSearch on 2026-10-18. The excerpts did not use the phrase as early as possible in the data flow, so this site does not quote it. It is guidance for software in general, not for payments.

    V34 review, 6 November 2026: Read complete official repository sheet. Syntax, semantic business rules, server checks and safe handling of legitimate Unicode/punctuation have distinct roles.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.