High severityPythonOther Security ChecksHIGH confidence
Flask Render Template String
User input flows into Flask render_template_string(), causing server-side template injection and reflected XSS (CWE-79).
Standards mapping
- OWASP Top 10
- A03:2021 - Injection
- OWASP ASVS
- V5.3.3 (L1)
Vulnerable vs. safe
Flagged by this check
return render_template_string("<h1>Hello " + name + "</h1>")Passes - the safe pattern
return render_template("greet.html", name=name)Why it matters & how to fix it
User input flows into Flask render_template_string(), causing server-side template injection and reflected XSS (CWE-79). Render a static template file and pass data through the context ({{ value }} is auto-escaped); never build the template source from request data.
References
Rule ID integsec-python-flask-render-template-string - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Other Security ChecksChild Process Shell True
- JavaScript / TypeScript - Other Security ChecksOpen Redirect Tainted Input
- Python - Other Security ChecksDjango Mark Safe
- Python - Other Security ChecksFlask Debug Enabled
- Python - Other Security ChecksInsecure Tempfile Mktemp
- Python - Other Security ChecksJinja2 Autoescape Off