/

CVE-2026-54721

Severity:

HIGH RISK

(8.8)

Server-Side Code Injection (CWE-94) in Silverstripe UserForms

CVE-2026-54721

Deferred

Vulnerability type

Category:

Server-Side Code Injection

CWE:

CWE-94

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

CVE-2026-54721 is a high-severity server-side code injection vulnerability in the Silverstripe UserForms visual form builder. An authenticated CMS user who can configure a UserForms email recipient may place a crafted value in the subject field, causing executable server-side code to run and potentially compromising the application.

Affected context

The vulnerability occurs in Silverstripe CMS deployments using UserForms email recipient configuration. It becomes risky when an authenticated CMS user has permission to configure a recipient and the subject field is processed in a way that interprets specially crafted content as server-side code rather than treating it strictly as data.

Exploit preconditions

  • Attack surface: The Silverstripe CMS UserForms administration interface
  • Required access: An authenticated CMS account with permission to configure a UserForms email recipient
  • Trigger point: Processing or sending a UserForms email whose recipient subject contains crafted content
  • Why exploitation is possible: Subject input is insufficiently separated from server-side code execution contexts

Why this happens

The underlying issue is a failure to maintain a strict separation between user-controlled subject data and executable server-side expressions. When specially crafted input is evaluated by a server-side templating or execution mechanism, an authorized user may influence application behavior beyond the intended email subject value. This maps to CWE-94: Improper Control of Generation of Code, commonly called code injection.

Potential impact

  • An attacker may execute arbitrary code with the privileges of the Silverstripe application
  • Confidential data could be accessed or exfiltrated
  • Application content and configuration could be modified
  • The CMS or underlying server could become unavailable
  • Compromised credentials or application access could support further attacks

General mitigation guidance

Mitigation generally focuses on preventing user-controlled values from reaching server-side code evaluation paths.

Common defensive patterns include:

  • Treating email subject fields strictly as data and disabling expression evaluation
  • Applying context-appropriate output encoding and allowlist-based validation
  • Separating template rendering from administrative input and using inert data-binding APIs
  • Limiting UserForms configuration permissions according to least privilege
  • Running the application with minimal operating-system and database privileges
  • Adding regression tests for code-injection behavior in form configuration fields

How teams detect issues like this

Organizations can look for this vulnerability through:

  • Static analysis rules identifying dynamic evaluation, unsafe template interpolation, or executable rendering of CMS fields
  • Code review checks for administrative inputs passed into template engines, interpreters, or command-construction APIs
  • Monitoring unusual changes to UserForms email recipient settings and unexpected server-side errors
  • Policy enforcement requiring allowlisted validation and non-executable rendering for configurable text fields
  • Automated security review tools that flag CWE-94 patterns in server-side code

Sources

SourceLink
github.comgithub.com/silverstripe/silverstripe-userforms/commit/23c069866900c19b499bfa997d1e251e97491702
github.comgithub.com/silverstripe/silverstripe-userforms/commit/c55494ad7c717b199a3c1663b43a54db5d95604c
github.comgithub.com/silverstripe/silverstripe-userforms/pull/1441
github.comgithub.com/silverstripe/silverstripe-userforms/pull/1442
github.comgithub.com/silverstripe/silverstripe-userforms/releases/tag/6.4.9
github.comgithub.com/silverstripe/silverstripe-userforms/releases/tag/7.0.7
github.comgithub.com/silverstripe/silverstripe-userforms/releases/tag/7.1.1
github.comgithub.com/silverstripe/silverstripe-userforms/security/advisories/GHSA-g8wr-r2v2-vqc6

Frequently asked

questions

It may be exploitable through the CMS administration interface when that interface is remotely accessible, but exploitation requires the attacker to authenticate and possess the relevant UserForms configuration permission.

The attacker needs an authenticated CMS account authorized to configure a UserForms email recipient. Ordinary public form submission access alone is not sufficient based on the described attack path.

Ensure that email subject values are handled only as inert data, with server-side code evaluation disabled and context-appropriate validation and encoding applied.

Apply least-privilege administration, review all configurable fields that reach template or expression-processing components, use safe rendering APIs, and add automated tests that verify crafted input cannot execute code.

Find out what's already
exploitable in your codebase.