String Concatenation and Template Literals with User Input
Express applications build HTML responses using string concatenation or template literals that embed user input directly: res.send('<h1>Welcome ' + req.query.name + '</h1>') or res.send(`<div>${userInput}</div>`). Developers use convenient string manipulation without understanding XSS implications. Template literals make interpolation syntactically simple encouraging direct embedding of untrusted data. User input containing <script>, event handlers (onload, onerror), or javascript: URLs gets rendered directly into HTML enabling arbitrary script execution. Even seemingly innocuous inputs like search queries or usernames become XSS vectors when rendered without encoding.