A security analyst reviews a web application log and sees the request GET /download?file=../../../../etc/passwd returning file contents. Which vulnerability is being exploited?
- A
Cross-site scripting, because the response reflects attacker supplied script back to the browser of another visitor
- B
Buffer overflow, because the long input string overwrites the stack and redirects execution to attacker shellcode
- C
Path traversal, because unvalidated input lets the attacker climb directories and read files outside the web root in the environment described
- D
SQL injection, because the attacker appended query syntax that changes how the back-end database executes the request
Correct answer: C — Explanation
Sequences of ../ in a file parameter that return a system file show path traversal, where the application fails to canonicalize and restrict the requested path. There is no query syntax for SQL injection, no script reflected for XSS, and no memory corruption evidence for a buffer overflow.