Skip to content

In-depth lesson · Server-side template injection

Tips for beginners

Every point the Server-side template injection reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 13 of 13
  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
  6. Stay in scope. Several reports involve third-party plugins, marketplace subdomains and demo instances, so confirm the asset is covered by the programme before spending time, and do not report a component the programme excludes.

    Seen in 3 reports
  7. Show impact with evidence, not just a payload. A report that only shows an evaluated expression without demonstrating what it reaches is weak; the stronger reports show file contents, command execution, privilege escalation or cross-tenant access.

    Seen in 3 reports
  8. Do not stop at reflection. The evidence shows template injection escalated to file reads, command execution, privilege escalation and cross-tenant data access. Demonstrate the strongest impact you can reach safely, and if you can only reach file read, say so clearly rather than claiming code execution.

    Seen in 2 reports
  9. If a WAF blocks your template payloads, try encoding and obfuscation variations before concluding the sink is safe. The evidence shows payloads reaching the engine past a WAF this way.

    Seen in 2 reports
  10. Use search-engine recon and intended functionality to find sinks at scale. The evidence includes template injection points found through search engines and through features the application is meant to expose, which is often more productive than guessing endpoints.

    Seen in 2 reports
  11. Use a simple arithmetic expression first and compare the output with the literal input. If the page or email shows the computed result, you have confirmed server-side evaluation; if it shows your text unchanged, move on rather than assuming a bug.

    Seen in 1 report
  12. Look at configuration values as well as form fields. Funnel YAML settings in analytics dashboards and placeholder substitution features are documented sinks where a value is interpolated into a generated query without validation.

    Seen in 1 report
  13. Test free-form parameters on search and GraphQL endpoints. A sort parameter that is forwarded to a backend which compiles scripts is a real sink, and schema validation is the fix, so absence of validation is worth probing.

    Seen in 1 report