Skip to content

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

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.

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.

Year by year

8 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2020: 84
Reports per year
20011
20131
20164
20171
20183
201968
202084
202115
202210
20238
202418
202531
202634
  1. 2026

    34 reports · median $7,000

    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.
  2. 2024

    18 reports · median $100

    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.

    Reports from 20243

    Every point and report from 2024
  3. 2023

    8 reports

    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.
    and 3 more

    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.
Every point, year by year

Where it is found

7

The features and places the reports found it in, most-reported first.

  1. Profile name and username fields that are rendered into account and invitation emails.

    Seen in 2 reports
  2. Customer portals in ERP and IT service management products.

    Seen in 2 reports
  3. Report generation libraries and business analytics servers.

    Seen in 2 reports
  4. The name parameter during the sign-up process.

    Seen in 1 report
  5. A free-form sort_query parameter on a GraphQL search endpoint.

    Seen in 1 report
View all 7

Root causes

5

The mistakes in the code or configuration behind the reports.

  1. Outdated components with published template injection flaws were left in place.

    Seen in 4 reports
  2. User-controlled fields were passed directly into templates without escaping or sandboxing.

    Seen in 3 reports
  3. Template engines were left with unsafe defaults or without security extensions enabled.

    Seen in 2 reports
  4. 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
  5. 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
More in CMS plugins and e-commerce platforms

Other

of 3 ticked
More in Other

Cloud, containers and internal services

of 3 ticked
More in Cloud, containers and internal services

Template engines and frameworks

of 3 ticked
More in Template engines and frameworks
View more things to try

Bypasses and variations

4

How reports got past filters, encoders and other defences.

  1. Template injection was chained with authorisation bypass, path traversal or other flaws to widen impact.

    Seen in 2 reports
  2. DNS rebinding was used alongside template injection to reach internal services.

    Seen in 1 report
  3. Code execution from template injection was extended to container escape and cloud infrastructure control.

    Seen in 1 report

Payouts

8 paid

Public 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.

SeverityReportsPaidMedianHighest
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

Typical fixes

4

How programs fixed it, as the reports describe.

  1. Enable template engine security extensions and keep components patched against published vulnerabilities.

    Seen in 5 reports
  2. Escape or reject template syntax in user-controlled fields before rendering, and sandbox the template engine.

    Seen in 3 reports
  3. Validate query parameters against a schema and reject scripted directives in sort and search inputs.

    Seen in 1 report
  4. Validate and escape configuration values before interpolating them into generated queries.

    Seen in 1 report

Tips for beginners

13

Advice for a first hunt, drawn from the reports.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
View all 13

Guides and techniques

The best explainers, cheat sheets and technique posts on Server-side template injection, from around the web.

Keep learning

Where this lesson fits, and what to read next.

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.