5.2medium
Craft CMS vulnerable to potential authenticated Remote Code Execution via Twig SSTI
- Severity
- 5.2medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.94% (higher than 61% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-742x-x762-7383
Description
Craft is a platform for creating digital experiences. Versions 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16 are vulnerable to potential authenticated Remote Code Execution via Twig SSTI. For this to work, users must have administrator access to the Craft Control Panel, and allowAdminChanges must be enabled, which is against Craft CMS' recommendations for any non-dev environment. Alternatively, a non-administrator account with allowAdminChanges disabled can be used, provided access to the System Messages utility is available. It is possible to craft a malicious payload using the Twig `map` filter in text fields that accept Twig input under Settings in the Craft control panel or using the System Messages utility, which could lead to a RCE. Users should update to the patched versions (5.8.21 and 4.16.17) to mitigate the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| craftcms cms | >= 5.0.0-RC1, < 5.8.21, >= 4.0.0-RC1, < 4.16.17 | CVE List |
| craftcms/cms (Packagist) | from 5.0.0-RC1 before 5.8.21, from 4.0.0-RC1 before 4.16.17 | GitHub Advisory Database |
| craftcms craft_cms | from 4.0.0.1 before 4.16.17, from 5.0.1 before 5.8.21, 4.0.0, 5.0.0 | NVD |
All scores
| GitHub_M | 5.2medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Craft is a platform for creating digital experiences. Versions 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16 are vulnerable to potential authenticated Remote Code Execution via Twig SSTI. For this to work, users must have administrator access to the Craft Control Panel, and allowAdminChanges must be enabled, which is against Craft CMS' recommendations for any non-dev environment. Alternatively, a non-administrator account with allowAdminChanges disabled can be used, provided access to the System Messages utility is available. It is possible to craft a malicious payload using the Twig `map` filter in text fields that accept Twig input under Settings in the Craft control panel or using the System Messages utility, which could lead to a RCE. Users should update to the patched versions (5.8.21 and 4.16.17) to mitigate the issue.
GitHub Advisory Database
For this to work, users must have administrator access to the Craft Control Panel, and allowAdminChanges must be enabled for this to work, which is against Craft CMS' recommendations for any non-dev environment.
https://craftcms.com/knowledge-base/securing-craft#set-allowAdminChanges-to-false-in-production
Alternatively, a non-administrator account with allowAdminChanges disabled can be used, provided access to the System Messages utility is available.
It is possible to craft a malicious payload using the Twig map filter in text fields that accept Twig input under Settings in the Craft control panel or using the System Messages utility, which could lead to a RCE.
Users should update to the patched versions (5.8.21 and 4.16.17) to mitigate the issue.
References:
https://github.com/craftcms/cms/commit/d82680f4a05f9576883bb83c3f6243d33ca73ebe
https://github.com/craftcms/cms/blob/5.x/CHANGELOG.md#5821---2025-12-04
NVD (es)
Craft es una plataforma para crear experiencias digitales. Las versiones 5.0.0-RC1 hasta la 5.8.20 y 4.0.0-RC1 hasta la 4.16.16 son vulnerables a una potencial ejecución remota de código autenticada a través de Twig SSTI. Para que esto funcione, los usuarios deben tener acceso de administrador al Panel de Control de Craft, y allowAdminChanges debe estar habilitado, lo cual va en contra de las recomendaciones de Craft CMS para cualquier entorno que no sea de desarrollo. Alternativamente, se puede usar una cuenta no administradora con allowAdminChanges deshabilitado, siempre que se tenga acceso a la utilidad de Mensajes del Sistema. Es posible crear una carga útil maliciosa usando el filtro 'map' de Twig en campos de texto que aceptan entrada Twig en la sección de Ajustes del panel de control de Craft o usando la utilidad de Mensajes del Sistema, lo que podría llevar a una RCE. Los usuarios deben actualizar a las versiones parcheadas (5.8.21 y 4.16.17) para mitigar el problema.
References
| https://github.com/craftcms/cms/security/advisories/GHSA-742x-x762-7383 | exploit, vendor-advisory, web | |
| https://github.com/craftcms/cms/commit/d82680f4a05f9576883bb83c3f6243d33ca73ebe | patch, web | |
| https://github.com/craftcms/cms/blob/5.x/CHANGELOG.md#5821---2025-12-04 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-68454 | advisory | |
| https://github.com/craftcms/cms | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-68454 changed 2026-01-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-742x-x762-7383 changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2025-68454 changed 2026-10-07 | Public domain |