{"id":"CVE-2026-28695","aliases":["CVE-2026-28695","GHSA-94rc-cqvm-m4pw"],"related":[],"kind":"vulnerability","state":"published","title":"Craft affected by authenticated RCE via Twig SSTI - create() function + Symfony Process gadget","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\nThis bypasses the fix implemented for CVE-2025-57811 (patched in 5.8.7).\n\n## Required Permissions\n\n- Administrator permissions or access to System Messages utility\n- `allowAdminChanges` enabled in production ([against our security recommendations](https://craftcms.com/knowledge-base/securing-craft#set-allowAdminChanges-to-false-in-production))  or access to System Messages utility\n\n## Vulnerability Details\nThe `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.\n\n## Attack Vector\nAdmin panel → Settings → Entry Types → Title Format field\n\n## Proof of Concept Payload\n\n```\n{% set p = create(\"Symfony\\\\Component\\\\Process\\\\Process\", [[\"id\"]])\n%}{{ p.mustRun.getOutput }}\n```\n\n## Steps to Reproduce\n1. Log in as admin\n2. Navigate to Settings → Entry Types\n3. Edit any entry type’s \"Title Format\" field\n4. Insert the payload above\n5. Create/edit an entry of that type\n6. Command executes, output appears in entry title\n\n## Impact\n- Authenticated Remote Code Execution\n- Runs as web server user (root in default Docker setup)\n- Full server compromise\n\n## Root Cause\nCraft::createObject() allows the instantiation of any class, including\n`Symfony\\Component\\Process\\Process`, which executes shell commands.\n\n## Suggested Fix\n\n- Blocklist dangerous classes in createObject() when called from Twig\n- Or remove/restrict the create() Twig function\n- Or validate class names against an allowlist\n\n## Resources\n\nhttps://github.com/craftcms/cms/commit/e31e50849ad71638e11ea55fbd1ed90ae8f8f6e0","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-03-03T20:30:36.000Z","modified":"2026-06-17T10:28:55.373Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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:P","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"}],"cwes":["CWE-22","CWE-94","CWE-1336"],"affected":[{"ranges":[{"version":">= 5.8.7, < 5.9.0-beta.1","status":"affected"},{"version":">= 4.0.0-RC1, < 4.17.0-beta.1","status":"affected"}],"vendor":"craftcms","product":"cms","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.8.7","status":"affected","fixed":"5.9.0-beta.1"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0-RC1","status":"affected","fixed":"4.17.0-beta.1"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"},{"ranges":[{"status":"affected","introduced":">4.0.0","fixed":"4.17.0"},{"status":"affected","introduced":">5.0.0","fixed":"5.9.0"},{"status":"affected","version":"4.0.0"},{"status":"affected","version":"4.0.0"},{"status":"affected","version":"4.0.0"},{"status":"affected","version":"4.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"}],"vendor":"craftcms","product":"craft_cms","cpe":"cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-94rc-cqvm-m4pw","tags":["exploit","mitigation","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/cms/commit/e31e50849ad71638e11ea55fbd1ed90ae8f8f6e0","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28695","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-03-05T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-28695","url":"https://www.cve.org/CVERecord?id=CVE-2026-28695","licence":"CVE Terms of Use","modified":"2026-03-06T05:01:24.295Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-94rc-cqvm-m4pw","url":"https://github.com/advisories/GHSA-94rc-cqvm-m4pw","licence":"CC-BY-4.0","modified":"2026-03-04T18:46:15.470Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-28695","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28695","licence":"Public domain","modified":"2026-06-17T10:28:55.373Z"}],"updatedAt":"2026-11-25T22:59:15.177Z","epss":{"score":0.00658,"percentile":0.52755,"date":"2026-12-01T12:00:22.000Z"}}