Property
Languageregex
Severitylow
CWECWE-79: Improper Neutralization of Input During Web Page Generation (‘Cross-site Scripting’)
OWASPA07:2017 - Cross-Site Scripting (XSS)
Confidence LevelLow
Impact LevelMedium
Likelihood LevelLow

Description#

Using unescaped output (with ‘!=’ or ‘!{…}’) in Pug templates directly inserts data into HTML without any filtering. If this includes user-controlled or external data, it can allow attackers to inject malicious scripts into your pages.

Impact#

Exploiting this vulnerability enables attackers to execute JavaScript in users’ browsers, leading to theft of session data, defacement, or phishing attacks. This can compromise user accounts, damage user trust, and expose sensitive information.