Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-28695

Craft CMS Vulnerable to Authenticated RCE via Twig SSTI - create() function + Symfony Process gadget
Back to all
CVE

CVE-2026-28695

Craft CMS Vulnerable to Authenticated RCE via Twig SSTI - create() function + Symfony Process gadget

There is an authenticated admin RCE in Craft CMS 5.8.21 via Server-Side Template Injection using the create() Twig function combined with a Symfony Process gadget chain.

This bypasses the fix implemented for CVE-2025-57811 (patched in 5.8.7).

Required Permissions

  • Administrator permissions or access to System Messages utility
  • allowAdminChanges enabled in production (against our security recommendations)  or access to System Messages utility

Vulnerability Details

The create() Twig function exposes Craft::createObject(), which allows instantiation of arbitrary PHP classes with constructor arguments. Combined with the bundled symfony/process dependency, this enables RCE.

Attack Vector

Admin panel → Settings → Entry Types → Title Format field

Proof of Concept Payload

{% set p = create("Symfony\\Component\\Process\\Process", [["id"]])
%}{{ p.mustRun.getOutput }}

Steps to Reproduce

  1. Log in as admin
  2. Navigate to Settings → Entry Types
  3. Edit any entry type’s "Title Format" field
  4. Insert the payload above
  5. Create/edit an entry of that type
  6. Command executes, output appears in entry title

Impact

  • Authenticated Remote Code Execution
  • Runs as web server user (root in default Docker setup)
  • Full server compromise

Root Cause

Craft::createObject() allows the instantiation of any class, including

Symfony\Component\Process\Process, which executes shell commands.

Suggested Fix

  • Blocklist dangerous classes in createObject() when called from Twig
  • Or remove/restrict the create() Twig function
  • Or validate class names against an allowlist

Resources

https://github.com/craftcms/cms/commit/e31e50849ad71638e11ea55fbd1ed90ae8f8f6e0

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.5
-
4.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

https://github.com/craftcms/cms/security/advisories/GHSA-94rc-cqvm-m4pw, https://nvd.nist.gov/vuln/detail/CVE-2026-28695, https://github.com/craftcms/cms/commit/e31e50849ad71638e11ea55fbd1ed90ae8f8f6e0, https://github.com/craftcms/cms

Severity

7.2

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.2
EPSS Probability
0.00027%
EPSS Percentile
0.07876%
Introduced Version
5.8.7,4.0.0-RC1
Fix Available
5.9.0-beta.1,4.17.0-beta.1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading