TInjA is a powerful CLI tool designed to detect and identify template injection vulnerabilities in web applications.

Developed by Hackmanit and Maximilian Hildebrand, it supports 44 of the most relevant template engines across eight programming languages, including Python, Java, JavaScript, and more.

Key Features

  • Automatic Detection and Identification: TInjA automatically detects template injection possibilities and identifies the template engine in use. It supports both server-side template injection (SSTI) and client-side template injection (CSTI) vulnerabilities.
  • Efficient Scanning: The tool uses polyglots to efficiently scan web pages. On average, only five polyglots are needed to detect vulnerabilities and identify the template engine.
  • Customization Options: Users can specify custom headers, cookies, POST parameters, and query parameters for the scan. It also allows routing traffic through a proxy and configuring ratelimiting to manage the number of requests per second.
  • Reporting and Output: TInjA can generate reports in JSONL format, providing detailed insights into the scan results. This feature is useful for tracking and analyzing vulnerabilities across multiple URLs.

TInjA supports a wide range of template engines across different programming languages:

  • .NET: DotLiquid, Fluid, Razor Engine, Scriban
  • Elixir: EEx
  • Go: html/template, text/template
  • Java: Freemarker, Groovy, Thymeleaf, Velocity
  • JavaScript: Angular.js, Dot, EJS, Eta, Handlebars, Hogan.js, Mustache, Nunjucks, Pug, Twig.js, Underscore, Velocity.js, Vue.js
  • PHP: Blade, Latte, Mustache.php, Smarty, Twig
  • Python: Chameleon, Cheetah3, Django, Jinja2, Mako, Pystache, SimpleTemplate Engine, Tornado
  • Ruby: ERB, Erubi, Erubis, Haml, Liquid, Mustache, Slim

TInjA can be installed using prebuilt binaries or by compiling it with Go (version 1.21 or higher). The tool offers flexible usage options, including scanning single URLs, multiple URLs, or URLs provided in a file.

It also supports passing raw HTTP requests and JSONL files for more complex scenarios. TInjA was developed as part of a master’s thesis by Maximilian Hildebrand.

It is part of a broader project that includes the Template Injection Table and the Template Injection Playground, which provide additional resources for understanding and testing template injection vulnerabilities.

TInjA is licensed under the Apache License, Version 2.0, making it freely available for use and modification.

LEAVE A REPLY

Please enter your comment!
Please enter your name here