Safe Filter on User Data
The safe filter is applied to template variables containing user-controlled data, bypassing auto-escaping.
XSS vulnerability in Flask/Jinja2 templates where the safe filter is used to disable autoescaping, rendering raw HTML content directly into pages. When user-controlled data is marked as safe, malicious scripts can execute in user browsers, leading to session theft and data compromise.
Configuration changes required - see explanation below.
Configuration changes required - see explanation below.
The safe filter is applied to template variables containing user-controlled data, bypassing auto-escaping.
Sourcery automatically identifies cross-site scripting (xss) via safe filter disabling autoescape in flask template and many other security issues in your codebase.