During a security assessment of a web application's user search module, an analyst inspects the backend implementation and observes two main security weaknesses:
1. User input from the search query parameter is directly concatenated into a dynamic database command string without prior validation or parameterization.
2. The raw search input is included verbatim in the application's HTML response page to display the search term without sanitization or output encoding.
Which of the following application vulnerabilities are present in this module? (Select TWO.)
- SQL InjectionAnswer
- Reflected Cross-Site ScriptingAnswer
- CInsecure Direct Object Reference
- DBuffer Overflow
Answer
The application suffers from SQL Injection and Reflected Cross-Site Scripting.
SQL Injection occurs because user input is concatenated directly into SQL queries without parameterization, allowing arbitrary command execution on the database. Reflected Cross-Site Scripting occurs because untrusted input is reflected immediately in the HTML output without context-aware encoding, allowing client-side script execution in the victim's browser.
Step-by-Step Solution
Key Concept
Identifying application vulnerabilities from data handling and backend code flaws.