loading
loading
Vulnerabilities
Detect and exploit server-side template injection on live parameters.
overview
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
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.
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.
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.
Inject through cookies, headers, POST data, or the URL so endpoints that take input outside the query string are still covered.
reference
| Name | Type | Flag | Description |
|---|---|---|---|
| url | STRING | --url | Target URL to test. |
| post-data | STRING | --data | Data sent via POST, as a query string (param1=value1¶m2=value2). |
| technique | STRING | -t | Techniques: R(endered), T(ime-based blind). Default RT. |
| header | STRING | -H | Extra headers, for example Header1: Value1. |
| cookie | STRING | -c | Cookies, for example Field1=Value1. |
| backend-engine | STRING | -e | Force the back-end template engine to a specific value. |
| os-cmd-to-execte | STRING | --os-cmd | Execute an operating-system command through a confirmed injection. |
| level-code-context | STRING | --level | Level of code-context escape to perform (1 to 5, default 1). |
Showing key inputs. tplmap exposes 16 inputs in total.
| Name | Type | Flag | Description |
|---|---|---|---|
| url | STRING | --url | Target URL. |
| proxy | STRING | --proxy | Use a proxy to connect to the target URL. |
| cookie | STRING | -c | Cookies (for example Field1=Value1). |
| header | STRING | -H | Extra headers (for example Header1: Value1). |
| tpl-code | STRING | --tpl-code | Inject code in the template engine. |
| post-data | STRING | --data | Data string to send via POST, as a query string: param1=value1¶m2=value2. |
| technique | STRING | -t | Techniques R(endered), T(ime-based blind). Default RT. |
| user-agent | STRING | -A | HTTP User-Agent header value. |
| force-level | BOOLEAN | --force-level | Force a LEVEL and CLEVEL to test. |
| http-method | STRING | -X | Force usage of a given HTTP method (for example PUT). |
| upload-file | FILE | --upload | Upload a file to the target. |
| injection-tag | STRING | --injection-tag | Use a string as the injection tag (default *). |
| backend-engine | STRING | -e | Force the back-end template engine to this value. |
| os-cmd-to-execte | STRING | --os-cmd | Execute an operating-system command. |
| level-code-context | STRING | --level | Level of code-context escape to perform (1 to 5, default 1). |
| force-overwrite-uploaded-files | BOOLEAN | --force-overwrite | Force file overwrite when uploading. |
example
# detect SSTI on a query parameter, then run one OS command if confirmedtplmap --url 'https://example.com/greeting?name=test' --os-cmd 'id'[+] 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
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.
Detects and exploits SQL injection. Same exploitation depth, different vulnerability class.
Template-based scanner with some SSTI checks among thousands. tplmap goes deeper on confirming and exploiting this class.
Crawls to find parameterized endpoints tplmap then tests. Run it upstream.
faq
related
Automates OS command injection detection and exploitation.
Subdomain takeover scanner with cloud-zone intake.
Locate public CVE proof-of-concept repositories on GitHub.
Decode, forge, crack, and tamper JWTs for auth checks.
Triage reflected special characters on parameterized URLs.
Detect and exploit SQL injection on authorized web targets.
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.