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.
- Find where text becomes action
- Use a team-made test item
- Stop at the first sign
- Report with steps
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The order slip | The request to the server |
| The extra whispered line | Text from a stranger treated as an instruction |
| The kitchen | The server and what it can reach |
| A rule that the kitchen follows only the waiter | The 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.
| In the trick | What it stands for |
|---|---|
| Fetched address | server-side request forgery |
| File name | path traversal |
| Command | command injection |
| Database query | database 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
- 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.
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.
- 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.
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.
- 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.
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.
- 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.
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.
- 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.
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
- 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)
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.
- 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)
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.
- 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.
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.
- 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.
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.
- 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.
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.
- 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)
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.
- 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.
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.
- 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.
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.