Daily security quiz #4
Question for 2026-11-04. Read the code and pick the most serious security vulnerability.
This code displays a search term on the page. What is the most serious vulnerability?
const params = new URLSearchParams(location.search);
const q = params.get('q') ?? '';
document.querySelector('#result-title').innerHTML =
'<b>' + q + '</b> search results';