Will It Vibe logoWill It Vibe?
INJECT-018Medium severity-8 points

Template rendered from an assembled string (Python)

Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

render_template_string or Template() is given a template built by f-string, .format(), or concatenation. A user-controlled template string is server-side template injection, which usually becomes remote code execution.

Why it matters

render_template_string or Template() built from an f-string, .format(), or concatenation means the template text itself is dynamic. A user-controlled template is server-side template injection, and in Jinja2 that usually leads to remote code execution. It is a heuristic because the assembled string may be fully trusted.

How to fix it

Keep the template static and pass data as context variables: render_template_string("Hello {{ name }}", name=name). Never build the template body from input. If users supply content, render it as data inside a fixed template, not as the template.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Security checks