CS Fundamentals Trainer · JavaScript · Security
Which of these can execute an attacker-controlled string str as JavaScript?
Which of these can execute an attacker-controlled string `str` as JavaScript?
- `eval(str)`
- `el.textContent = str`
- `setTimeout(str, 0)`
- `new Function(str)`
- `JSON.parse(str)`
Difficulty: easy