Web Security · Junior · Question 16 of 75
What is cross-site scripting (XSS)?
- 1Sharing JavaScript code between two of your own websites
- ✓Correct answer: Injecting attacker-controlled script that runs in other users' browsers in the context of the vulnerable site
- 3Loading a script from another domain with a
<script src>tag
Explanation
The injected script runs with the site's origin: it can read the page, act as the user and send data to the attacker.