Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-103537 Overview
CVE-2026-103537 is an absolute path traversal vulnerability in Thelia 2.6.1 that enables Server-Side Template Injection (SSTI) and remote code execution. The flaw resides in the Smarty template handling layer. The checkTemplate() validation routine rejects relative traversal sequences such as ../ but fails to reject absolute filesystem paths. An authenticated user can supply an arbitrary absolute path as a template reference. Smarty then loads and compiles the referenced file without an effective security policy. Depending on filesystem layout and deployment configuration, template code within the referenced file executes with the privileges of the web server process. The weakness is classified under CWE-94: Improper Control of Generation of Code.
Critical Impact
Authenticated attackers can achieve remote code execution on Thelia 2.6.1 instances by abusing absolute path handling in Smarty template loading.
Affected Products
- Thelia 2.6.1
- Deployments bundling the vulnerable Smarty template handling logic
- Instances exposing authenticated template-selection functionality to low-privileged accounts
Discovery Timeline
- 2026-10-12 - CVE-2026-103537 published to NVD
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2026-103537
Vulnerability Analysis
Thelia uses the Smarty templating engine to render views. The checkTemplate() function is responsible for validating template path inputs before Smarty loads them. The validator rejects relative traversal sequences, so inputs containing ../ or similar components are blocked. The validator does not reject absolute paths such as /etc/thelia/custom.tpl or paths under a web-writable directory. An authorized user with access to template-selection functionality can therefore submit an absolute filesystem path. Smarty treats that path as a legitimate template source and compiles its contents. Because Smarty's security policy is not enforced on this code path, template directives in the referenced file execute. Smarty's compiled templates can invoke PHP functions, which converts the write-or-load primitive into full remote code execution under the web server account.
Root Cause
The root cause is incomplete input validation in checkTemplate(). The function enumerates one class of unsafe input (relative traversal) while ignoring another (absolute paths). Smarty is then invoked without a Smarty_Security policy that would constrain template directory roots or disable PHP calls from templates.
Attack Vector
Exploitation requires network access to the Thelia application and a valid authenticated session with privileges to influence template selection. The attacker stages a file containing Smarty directives at a path reachable by the PHP process, such as an uploaded asset directory, a world-writable temp path, or any location the attacker can seed. The attacker then supplies the absolute path through the vulnerable template parameter. Smarty loads, compiles, and executes the file. See the CERT Vulnerability Advisory #162329 for additional technical detail.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-103537
Indicators of Compromise
- Template parameters in HTTP requests containing absolute filesystem paths such as values beginning with / on Linux or a drive letter on Windows.
- Unexpected files written to Smarty compile or cache directories referencing non-standard template sources.
- PHP processes spawning shell interpreters (sh, bash, cmd.exe) with the web server as the parent.
- Outbound network connections initiated by the PHP-FPM or Apache worker process immediately after a template-rendering request.
Detection Strategies
- Inspect application and reverse-proxy logs for template-selection parameters whose values resolve to absolute paths outside the designated Thelia template roots.
- Monitor the Smarty compile directory for new .php files whose source template path lies outside the application tree.
- Alert on child processes of the web server that are not part of the normal Thelia runtime profile.
Monitoring Recommendations
- Enable verbose logging for authenticated administrative endpoints that accept template or layout parameters.
- Forward web server, PHP error, and host process-execution telemetry to a centralized analytics backend for correlation.
- Baseline normal template references and alert on deviations such as paths under /tmp, /var/tmp, or upload directories.
How to Mitigate CVE-2026-103537
Immediate Actions Required
- Restrict access to administrative and template-selection functionality to trusted accounts only.
- Audit existing Thelia user accounts and revoke template-authoring privileges that are not strictly required.
- Review Smarty compile and cache directories for unauthorized compiled templates and remove any that cannot be attributed to a legitimate template source.
Patch Information
No vendor patch is referenced in the current NVD entry for CVE-2026-103537. Monitor the CERT Vulnerability Advisory #162329 and the Thelia project for updated releases and apply fixes once published.
Workarounds
- Enforce a Smarty security policy that restricts template loading to a fixed allowlist of directories under the application root.
- Patch or wrap checkTemplate() locally to reject inputs that are absolute paths or that resolve outside the approved template directory after canonicalization.
- Run the PHP process under a dedicated low-privilege account with no write access to template directories, and apply filesystem ACLs to prevent attacker-controlled files from being placed in locations reachable by Smarty.
# Configuration example: restrict Smarty to approved template roots
# (apply within Thelia bootstrap where the Smarty instance is created)
$smarty->setTemplateDir([
'/var/www/thelia/templates/frontOffice',
'/var/www/thelia/templates/backOffice',
]);
$smarty->enableSecurity('Smarty_Security');
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

