In-depth lesson · technique
Server-side template injection
What every disclosed Server-side template injection report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.
- reports cited in this lesson
- 60
- median public bounty
- $7,500
Learning Server-side injection, step 7
Overview
What it is and why programs pay for it.
Server-side template injection is a flaw where user-supplied input reaches a template engine and is treated as part of the template rather than as plain data. When a field such as a profile name, a search term or a configuration value is rendered by the engine without escaping or sandboxing, the engine may evaluate expressions the attacker supplies. The reports behind this lesson show the pattern repeatedly: names and usernames rendered into account and invitation emails, search boxes, sign-up and password reset fields, and free-form parameters on search endpoints.
Programs care because the impact is usually severe. Once an engine evaluates input, a hunter can often read local files, and from there reach command execution, privilege escalation or access to other tenants' data. Several reports show template injection chained with authorisation bypass, path traversal or other flaws to widen the blast radius, and one shows a console editor flaw escalated to root access. Even where full code execution is not reached, evaluation can leak personal data or be turned into reflected cross-site scripting.
It turns up most often in places where the application builds text for a person to read: emails, portals, dashboards and reports. The evidence covers profile and username fields feeding emails, search pages, enterprise management consoles, ERP and IT service management portals, report generation libraries, analytics dashboards and configuration values such as funnel settings. It also appears in older or third-party components left with unsafe defaults, including CMS plugins, Jira macros, Apache Solr and cloud CLI tooling, which is why version fingerprinting and patch awareness matter as much as manual testing.
Seen in these reports16
-
$10,000 -
-
Show 5 moreShow fewer
-
$7,000 High -
$1,639 -
Medium -
High -
High
How it works
The mechanics, as the reports show them.
The mechanism is simple in concept. The application takes a value the user controls and places it into a template that the server later compiles and renders. If the value is inserted as data and escaped, it stays literal text. If it is inserted as template source, the engine parses it as instructions. The root cause in the evidence is consistently the same: user-controlled fields passed directly into templates without escaping or sandboxing, or engines left with unsafe defaults and security extensions disabled.
A hunter first needs to find a sink where input is rendered server-side. Good candidates are fields that end up in emails, portals, dashboards or generated reports, because those are rendered by a template engine rather than echoed straight back. The evidence lists profile names and usernames in invitation emails, sign-up name parameters, password reset email fields, search boxes, management console editors, customer portals and free-form sort parameters on search endpoints. Configuration values such as funnel settings in analytics dashboards are another route, where a value is interpolated into a generated query without validation.
The next step is to confirm evaluation rather than reflection. A common approach is to place a simple arithmetic expression in the field and compare the rendered output with the literal input: if the output shows the computed result, the engine evaluated it. The evidence describes this for profile names triggering account emails, sign-up names, password reset email fields and search boxes. Fuzzing arithmetic expressions across engines also helps identify which template engine is in use before attempting to escalate.
Once evaluation is confirmed, the hunter tries to turn it into meaningful impact. The evidence shows reading local files through the engine, then moving toward command execution, privilege escalation or access to other tenants' data. Some reports chain template injection with authorisation bypass, path traversal or DNS rebinding to reach internal services, and one extends code execution to container escape and cloud infrastructure. Where full execution is not possible, evaluation can still be escalated into reflected cross-site scripting through curly-brace expressions.
What makes it possible is a combination of design and maintenance failures. Outdated components with published template injection flaws were left in place across many reports, and CMS plugins, Jira macros, Apache Solr and cloud CLI tooling all feature in the evidence. Unsafe defaults and missing security extensions are the other half. Defences that do exist can sometimes be bypassed with encoding and obfuscation variations when a WAF blocks template payloads, so a blocked request is not proof the sink is safe.
Seen in these reports24
-
$10,000 -
-
High
Show 5 moreShow fewer
-
$1,639 -
-
$7,000 High -
Medium
Year by year
8 yearsWhat each year's disclosed reports show, newest first. A year with few reports says less.
| 2001 | 1 |
|---|---|
| 2013 | 1 |
| 2016 | 4 |
| 2017 | 1 |
| 2018 | 3 |
| 2019 | 68 |
| 2020 | 84 |
| 2021 | 15 |
| 2022 | 10 |
| 2023 | 8 |
| 2024 | 18 |
| 2025 | 31 |
| 2026 | 34 |
-
2026
New this year1
- GraphQL search resolvers with free-form sort parameters are newly reported as a template injection surface.
Turned up less1
- Jira custom user macro testing, seen in 2024, is absent from the 2026 evidence.
Reports from 20261
-
$7,000 High
-
2024
New this year2
- Jira custom user macros and Jira plugins are newly reported as template injection surfaces.
- Configuration-driven analytics backends and funnel YAML fields are newly reported as injection points.
Kept working2
- Template injection was chained with authorisation bypass, path traversal or other flaws to widen impact.
- WordPress plugins rendering Twig templates, such as multilingual plugins, were tested for authenticated template injection.
Turned up less2
- Apache Solr Velocity testing, seen in 2020 and 2021, is not represented in the 2024 evidence.
- Lodash and Rails ujs testing, seen in 2021, does not appear in 2024.
-
2023
New this year3
- Chaining template injection with authorisation bypass, path traversal and container escape clearly grows this year.
- Container escape from template injection to cloud infrastructure control is newly documented.
- Cloud-native project code was reviewed for template injection in rendered configuration.
Kept working5
- CMS plugins with known template injection advisories were tested against their published CVEs.
- Report generation libraries and business analytics servers were tested for template injection.
Turned up less2
- Sign-up name and password reset email field testing, seen in 2022, is absent from the 2023 evidence.
- DNS rebinding combined with template injection, seen in 2022, does not appear in 2023.
Earlier years5
Where it is found
7The features and places the reports found it in, most-reported first.
-
Profile name and username fields that are rendered into account and invitation emails.
-
Customer portals in ERP and IT service management products.
-
Report generation libraries and business analytics servers.
-
The name parameter during the sign-up process.
Seen in 1 report
-
A free-form sort_query parameter on a GraphQL search endpoint.
Seen in 1 report
Technologies in these reports16
Root causes
5The mistakes in the code or configuration behind the reports.
-
Outdated components with published template injection flaws were left in place.
Seen in 4 reports
-
User-controlled fields were passed directly into templates without escaping or sandboxing.
Seen in 3 reports
-
Template engines were left with unsafe defaults or without security extensions enabled.
-
A query layer treated a free-form parameter as an opaque string and forwarded it to a backend that compiles scripts.
Seen in 1 report
-
A configuration value was interpolated directly into a generated query string without validation.
Seen in 1 report
Things to try
The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.
ticked in this lesson
CMS plugins and e-commerce platforms
of 3 ticked-
Seen in 5 reports
-
Seen in 3 reports
Cloud, containers and internal services
of 3 ticked-
Seen in 2 reports
-
Seen in 1 report
Template engines and frameworks
of 3 ticked-
Seen in 3 reports
-
Seen in 2 reports
-
Seen in 1 report
Bypasses and variations
4How reports got past filters, encoders and other defences.
-
Template injection was chained with authorisation bypass, path traversal or other flaws to widen impact.
-
Encoding and obfuscation variations were used to get template payloads past a WAF.
-
DNS rebinding was used alongside template injection to reach internal services.
Seen in 1 report
-
Code execution from template injection was extended to container escape and cloud infrastructure control.
Payouts
8 paidPublic bounties in US dollars, from the data. 8 of 337 reports show an amount.
- a quarter paid up to
- $1,529
- median
- $7,500
- three quarters paid up to
- $10k
- highest
- $23k
One in ten paid reports was paid $14k or more.
| Severity | Reports | Paid | Median | Highest |
|---|---|---|---|---|
| Critical | 10 | 0 | None paid | None |
| High | 131 | 1 | $7,000 | $7,000 |
| Medium | 3 | 0 | None paid | None |
| Low | 1 | 1 | $100 | $100 |
| Informational | 2 | 0 | None paid | None |
| Unrated | 190 | 6 | $9,000 | $23k |
Highest-paid reports5
-
$23,000 -
$10,000 -
$10,000 -
$8,000 -
$7,000 High
Typical fixes
4How programs fixed it, as the reports describe.
-
Enable template engine security extensions and keep components patched against published vulnerabilities.
Seen in 5 reports
-
Escape or reject template syntax in user-controlled fields before rendering, and sandbox the template engine.
Seen in 3 reports
-
Validate query parameters against a schema and reject scripted directives in sort and search inputs.
Seen in 1 report
-
Validate and escape configuration values before interpolating them into generated queries.
Seen in 1 report
Tips for beginners
13Advice for a first hunt, drawn from the reports.
-
Remember the fix when writing up. Escaping or rejecting template syntax, sandboxing the engine, enabling security extensions and validating query parameters are the documented remedies, and describing the correct fix strengthens the report.
Seen in 7 reports
-
Check CMS plugins and third-party add-ons against their published advisories. The evidence covers Magento email templates, Craft CMS SEOmatic, WordPress multilingual plugins, Microweber, PyroCMS and Jira plugins, all of which render user-influenced fields.
Seen in 5 reports
-
Fingerprint product versions and check for publicly documented template injection flaws in components such as Spring, EJS, Twig, Velocity, Freemarker and Smarty. Outdated components are a recurring root cause, so patch-level recon is often faster than blind fuzzing.
Seen in 4 reports
-
Start with fields that are rendered into emails or portals rather than echoed straight back. Profile names, usernames, sign-up names and password reset email fields are all documented sinks, and the rendered email or welcome page is where you check for evaluation.
Seen in 3 reports
-
Consider chaining. Template injection has been combined with authorisation bypass, path traversal, DNS rebinding and other flaws to widen impact, and one report used it to reach internal services. A low-impact evaluation finding may become serious when chained.
Seen in 3 reports
Guides and techniques
The best explainers, cheat sheets and technique posts on Server-side template injection, from around the web.
-
Limitations are just an illusion – advanced server-side template exploitation with RCE everywhereAdvanced SSTI exploitation achieving RCE in Jinja2, Mako and Twig without quotes or plugins, with step-by-step payloads.
Technique yeswehack.com
-
How to find SSTI, cache poisoning, business logic vulnerabilities: methodology tips from top Bug Bounty huntersTop hunters share recon and exploitation methodology for server-side template injection, cache poisoning and business logic flaws.
Methodology yeswehack.com
-
SSTI: A complete guide to exploiting advanced server-side template injectionsDeep guide to server-side template injection across Jinja2, Twig and ERB, including sandbox escapes and escalation to remote code execution.
Explainer intigriti.com
-
7 Ways to achieve remote code executionSurveys seven routes to remote code execution, from file uploads and deserialisation to SSRF escalation and dependency confusion.
Explainer intigriti.com
-
White-box penetration testing: Debugging for Python vulnerabilitiesShows how to debug a Python web app in VS Code to trace payloads and uncover hidden flaws.
Technique yeswehack.com
Keep learning
Where this lesson fits, and what to read next.
Learning paths
The whole class
Related techniques
How this is made: our model read every listed Server-side template injection report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 26 Nov 2026 from 62 reports. All Server-side template injection reports.