A security analyst is evaluating code remediation requirements following an assessment of an enterprise web portal. The evaluation identified two primary software flaws: database queries constructed by concatenating unsanitized user inputs, and user-submitted data reflected directly into rendered HTML responses without escaping. Which of the following mitigation strategies must developers implement to address these specific application vulnerabilities? (Select TWO).
- Implement parameterized queries (prepared statements) for all database interactionsAnswer
- Apply context-aware output encoding on user data rendered in web pagesAnswer
- CDeploy stateful network firewalls at the enterprise perimeter to inspect HTTP payload bodies
- DEnforce multi-factor authentication (MFA) for all web application user logins
Answer
Developers must implement parameterized queries (prepared statements) for database interactions and apply context-aware output encoding on rendered web page data.
The correct mitigations directly address the root causes of the vulnerabilities: parameterized queries (prepared statements) prevent SQL injection by treating input strictly as data parameters, while context-aware output encoding neutralizes Cross-Site Scripting (XSS) by rendering client-side scripts as plain text rather than executable browser code.
Step-by-Step Solution
Key Concept
Application Input Validation and Output Sanitization Controls
Estimated Time:1m 30s