Updated Jul 14, 2026

Vulnerabilities

Confirm server-side template injection to code execution

Detect and exploit server-side template injection on live parameters.

Agent

overview

What tplmap does

In a Trickest Vulnerabilities workflow, tplmap takes a parameterized --url (plus optional --data, -c, or -H) and writes confirmed SSTI findings as file and folder outputs.

Reach for it when user input may reach a template engine. Probes with -t (rendered and time-based blind by default), optional -e for a known engine, and --level for code-context escape depth.

sqlmap covers SQL injection; nuclei has shallow SSTI templates among many checks. tplmap stays on one class: confirm the engine context, then prove impact with --os-cmd or --upload.

source github.com/epinna/tplmap

use cases

Where tplmap fits

Detect template injection on live endpoints

Feed parameterized URLs to tplmap so it probes each input, fingerprints the rendering engine, and confirms whether user data is evaluated as template code rather than printed.

Catch blind injections with timing

Use the time-based blind technique to flag injections that never reflect output, so a vulnerable but silent endpoint still surfaces from response timing alone.

Demonstrate code execution

Once a context is confirmed, run an OS command with --os-cmd or upload a file to prove the finding leads to execution, not only to a rendered expression.

Test inputs in any position

Inject through cookies, headers, POST data, or the URL so endpoints that take input outside the query string are still covered.

reference

tplmap inputs and flags

16 inputs
NameTypeFlagDescription
urlSTRING--urlTarget URL to test.
post-dataSTRING--dataData sent via POST, as a query string (param1=value1&param2=value2).
techniqueSTRING-tTechniques: R(endered), T(ime-based blind). Default RT.
headerSTRING-HExtra headers, for example Header1: Value1.
cookieSTRING-cCookies, for example Field1=Value1.
backend-engineSTRING-eForce the back-end template engine to a specific value.
os-cmd-to-execteSTRING--os-cmdExecute an operating-system command through a confirmed injection.
level-code-contextSTRING--levelLevel of code-context escape to perform (1 to 5, default 1).

Showing key inputs. tplmap exposes 16 inputs in total.

Full flag reference (16 inputs)
NameTypeFlagDescription
urlSTRING--urlTarget URL.
proxySTRING--proxyUse a proxy to connect to the target URL.
cookieSTRING-cCookies (for example Field1=Value1).
headerSTRING-HExtra headers (for example Header1: Value1).
tpl-codeSTRING--tpl-codeInject code in the template engine.
post-dataSTRING--dataData string to send via POST, as a query string: param1=value1&param2=value2.
techniqueSTRING-tTechniques R(endered), T(ime-based blind). Default RT.
user-agentSTRING-AHTTP User-Agent header value.
force-levelBOOLEAN--force-levelForce a LEVEL and CLEVEL to test.
http-methodSTRING-XForce usage of a given HTTP method (for example PUT).
upload-fileFILE--uploadUpload a file to the target.
injection-tagSTRING--injection-tagUse a string as the injection tag (default *).
backend-engineSTRING-eForce the back-end template engine to this value.
os-cmd-to-execteSTRING--os-cmdExecute an operating-system command.
level-code-contextSTRING--levelLevel of code-context escape to perform (1 to 5, default 1).
force-overwrite-uploaded-filesBOOLEAN--force-overwriteForce file overwrite when uploading.

example

Run tplmap

tplmap · command
# detect SSTI on a query parameter, then run one OS command if confirmedtplmap --url 'https://example.com/greeting?name=test' --os-cmd 'id'
sample output
[+] Tplmap 0.5[+] Testing if GET parameter 'name' is injectable[+] Jinja2 plugin has confirmed injection with tag '{{*}}'[+] Tplmap identified the following injection point:      GET parameter: name      Engine: Jinja2      Injection: {{*}}      Context: text      Capabilities: Shell command execution: ok, Code evaluation: ok[+] Run commands on the operating system.

guidance

Choosing tplmap

Use tplmap when a parameterized endpoint may evaluate template input. For SQL injection use sqlmap; for broad templated checks use nuclei. Feed it URLs a crawler has already found.

sqlmap

Detects and exploits SQL injection. Same exploitation depth, different vulnerability class.

nuclei

Template-based scanner with some SSTI checks among thousands. tplmap goes deeper on confirming and exploiting this class.

katana

Crawls to find parameterized endpoints tplmap then tests. Run it upstream.

faq

tplmap questions

Yes. Include the time-based blind technique with -t T (default RT runs rendered and blind together). Timing confirms injections that never reflect output.

Run tplmap yourself

A target feeds katana, which crawls for parameterized endpoints and passes them to tplmap, which tests for template injection and writes the findings.

Facts on this page come from the live Trickest tool library.