Aug 27, 2026·5 min read·5 visits
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.
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.
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.
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 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.
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.
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.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
silverstripe/silverstripe-userforms Silverstripe | < 6.4.9 | 6.4.9 |
silverstripe/silverstripe-userforms Silverstripe | >= 7.0.0, < 7.0.7 | 7.0.7 |
silverstripe/silverstripe-userforms Silverstripe | >= 7.1.0, < 7.1.1 | 7.1.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-94: Improper Control of Generation of Code ('Code Injection') |
| Attack Vector | Network (AV:N) |
| CVSS Score | 8.8 (High) |
| Exploit Status | Proof of Concept available in tests |
| KEV Status | Not Listed |
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.
A Server-Side Template Injection (SSTI) vulnerability in the Silverstripe Advanced Workflow module allows authenticated attackers with workflow authoring permissions to achieve arbitrary code execution. By manipulating the NotifyUsersWorkflowAction.EmailTemplate field, attackers can inject template code that dynamically executes arbitrary PHP commands via the core translation helper interpolation path.
A path traversal and arbitrary file write vulnerability exists in the libreoffice-convert Node.js package in all versions prior to 1.8.2. The convertWithOptions function fails to validate or sanitize the caller-controlled options.fileName parameter, allowing directory traversal sequences to write files outside the temporary directory.
Crossplane's runtime package manager engine contains a Time-of-Check to Time-of-Use (TOCTOU) race condition in its container signature verification pipeline. When Crossplane parses package definitions using dynamic tag-based references, it resolves the tag on the remote OCI registry twice: once during the signature verification step (the 'Check' phase) and once during the fetch and install step (the 'Use' phase). An attacker controlling the destination OCI registry can exploit this vulnerability by serving a validly signed benign image for the verification phase, and then dynamically swapping the tag to point to an unsigned, malicious package during the fetch phase.
CVE-2026-54356 is a missing authorization vulnerability (CWE-862) within the backend component of the Budibase low-code platform. The vulnerability exists inside the `@budibase/server` package in versions prior to 3.41.3. An authenticated user with the lowest privilege level can invoke the attachment upload URL endpoint directly and obtain an S3 pre-signed PutObject URL signed with the server's S3 credentials.
CVE-2026-54556 is a high-severity Denial of Service (DoS) vulnerability impacting the Ember HTTP/2 backend of http4s, a popular functional Scala interface for HTTP services. The vulnerability arises from an improper handling of highly compressed HPACK header blocks, which enables unauthenticated remote attackers to trigger severe memory amplification and crash the JVM runtime via an OutOfMemoryError.
A validation bypass vulnerability exists in starlette-admin versions prior to 0.16.1. The administrative REST list API fails to validate user-controlled query parameters against server-side schemas. This allows authenticated users to sort or filter data using fields marked as hidden, non-sortable, or non-searchable. This behavior leads to unauthorized information exposure via blind sorting and denial of service via uncaught database exceptions.