Aug 27, 2026·5 min read·39 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.
CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.
An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.
GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.
CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.
CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.
An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.