A web application includes the following code to handle sear…

A web application includes the following code to handle search queries: app.get(“/search”, (req, res) => {    const q = req.query.q;    res.send(`You searched for: ${q}`);}); The developer claims the page is safe because it “does not interact with the database.”What is the primary security risk in this endpoint?

Page code:                    res.send(`${req.query.q}`); Co…

Page code:                    res.send(`${req.query.q}`); Cookies:                    sessionID=abc123; SameSite=None; Secure The developer claims session theft is impossible because the cookie is “Secure” and “SameSite=None”.Which attacker-supplied payloads will successfully steal the victim’s sessionID cookie when the victim clicks the malicious link?(Select all that apply)

Page code:                    res.send(`${req.query.q}`); Co…

Page code:                    res.send(`${req.query.q}`); Cookies:                    sessionID=abc123; SameSite=None; Secure The developer claims session theft is impossible because the cookie is “Secure” and “SameSite=None”.Which attacker-supplied payloads will successfully steal the victim’s sessionID cookie when the victim clicks the malicious link?(Select all that apply)