During a security review of a cloud-hosted feedback portal, an analyst discovers that user comments submitted to the support forum are stored in the application database without sanitization. When an administrator views the support dashboard, script tags embedded inside user comments execute within the administrator's browser session, attempting to transmit session tokens to an external host.
Which of the following correctly identifies the vulnerability type demonstrated in this incident and the most effective code-level remediation?
- Cross-Site Scripting (XSS); implement context-aware output encoding and input validation.Cevap
- BSQL Injection (SQLi); implement parameterized database queries using prepared statements.
- CBuffer Overflow; configure stateful network firewall rules to drop oversized HTTP payload packets.
- DBroken Authentication; enforce multi-factor authentication (MFA) across all web portal endpoints.
Cevap
Cross-Site Scripting (XSS); implement context-aware output encoding and input validation.
The correct option correctly identifies the flaw as Stored Cross-Site Scripting (XSS) and selects context-aware output encoding as the effective remediation. When untrusted input stored in a backend system is sent to a client browser without proper HTML/JS entity encoding, the browser interprets the input as executable code.
Adım Adım Çözüm
Anahtar Kavram
Stored Cross-Site Scripting (XSS) Remediation
Tahmini Süre:1m 30s