CVE-2026-28695
JSON

7.5high

Craft affected by authenticated RCE via Twig SSTI - create() function + Symfony Process gadget

Severity
7.5high CVSS:4.0 by GitHub_M
Exploit likelihood
0.66% (higher than 52% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-94rc-cqvm-m4pw

Description

Craft is a content management system (CMS). 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. 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. This bypasses the fix implemented for CVE-2025-57811 (patched in 5.8.7). This vulnerability is fixed in 5.9.0-beta.1 and 4.17.0-beta.1.

Affected

Product or packageVersionsReported by
craftcms cms>= 5.8.7, < 5.9.0-beta.1, >= 4.0.0-RC1, < 4.17.0-beta.1CVE List
craftcms/cms (Packagist)from 5.8.7 before 5.9.0-beta.1, from 4.0.0-RC1 before 4.17.0-beta.1GitHub Advisory Database
craftcms craft_cmsfrom >4.0.0 before 4.17.0, from >5.0.0 before 5.9.0, 4.0.0, 5.0.0NVD

All scores

GitHub_M7.5high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS: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:P
NVD7.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-22CWE-94CWE-1336

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Craft is a content management system (CMS). 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. 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. This bypasses the fix implemented for CVE-2025-57811 (patched in 5.8.7). This vulnerability is fixed in 5.9.0-beta.1 and 4.17.0-beta.1.

GitHub Advisory Database

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

NVD (es)

Craft es un sistema de gestión de contenido (CMS). Hay una RCE de administrador autenticado en Craft CMS 5.8.21 a través de Inyección de Plantilla del Lado del Servidor usando la función Twig create() combinada con una cadena de gadgets de Symfony Process. La función Twig create() expone Craft::createObject(), lo que permite la instanciación de clases PHP arbitrarias con argumentos de constructor. Combinado con la dependencia symfony/process incluida, esto habilita RCE. Esto elude la corrección implementada para CVE-2025-57811 (parcheado en 5.8.7). Esta vulnerabilidad está corregida en 5.9.0-beta.1 y 4.17.0-beta.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-28695 changed 2026-03-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-94rc-cqvm-m4pw changed 2026-03-04CC-BY-4.0
NVDCVE-2026-28695 changed 2026-06-17Public domain