Mautic has Server-Side Template Injection (SSTI) in Theme Templates
Impact
A Server-Side Template Injection (SSTI) vulnerability exists in Mautic's theme engine. The platform renders uploaded Twig templates without a sandbox or strict function restrictions. Authenticated users with permissions to create or upload themes can abuse this to execute arbitrary code.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 1.3.0; no upper bound recordedVersions | Not recorded |
| From 5.0.0 before 5.2.11Ecosystem versions | 5.2.11 |
| From 6.0.0 before 6.0.9Ecosystem versions | 6.0.9 |
| From 7.0.0 before 7.1.2Ecosystem versions | 7.1.2 |
Version evidence: OSV · GHSA-9fx4-7cmj-47vg
View original version evidence (213 explicit versions)
Original source description
Summary
A Server-Side Template Injection (SSTI) vulnerability exists in Mautic's theme engine. The platform renders uploaded Twig templates without a sandbox or strict function restrictions. Authenticated users with permissions to create or upload themes can abuse this to execute arbitrary code.
Impact
An authenticated user with theme upload and creation privileges can bypass boundaries to execute arbitrary system commands on the hosting server (Remote Code Execution) or access restricted system files and configuration settings.
Patched Versions
This security issue has been addressed in the following releases:
- 7.1.2
- 6.0.9
- 5.2.11
For users on Mautic 4.x, this fix is available in:
- 4.4.20 via ELTS
Mautic strongly recommend upgrading to a patched version immediately.
Workarounds
There are no official workarounds. To mitigate this vulnerability without upgrading, restrict theme upload and creation permissions (core:themes:create) to only highly trusted administrators.