Multiple choice technology security

Identify the Name of the security risk in the below scenario : Malicious script echoed back into HTML returned from a trusted site, and runs under trusted Context

  1. Cross Site scripting

  2. SQL Injection

  3. Session Fixation

  4. Cross Site Request Forgery

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This scenario describes Cross-Site Scripting (XSS), where malicious script is injected into a trusted site's output and executed in a user's browser under the trusted site's context. SQL Injection involves database manipulation, Session Fixation involves session hijacking, and CSRF involves forced actions.

AI explanation

Cross-site scripting (XSS) occurs when untrusted input containing script is reflected or stored by a trusted site and then executed in a victim's browser under that site's trusted origin. This differs from SQL injection, which targets a database backend, and from CSRF, which forges requests using a victim's existing session rather than injecting script. Session fixation is a separate attack where the attacker sets a known session ID for the victim ahead of time.