[Security] XSS in urlize filter via unescaped URL in href attribute
Author: eddieranCreated Apr 10, 2026Updated Sep 14, 2026
Summary
The urlize filter in nunjucks/src/filters.js:593 injects URLs into <a href=""> via string interpolation without HTML-escaping, allowing attribute breakout and event handler injection when used with | safe or autoescape: false.
Suggested Fix
HTML-escape the URL before inserting into the href attribute.
Source: mozilla/nunjucks