CVE-2025-68454
JSON

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 packageVersionsReported by
craftcms cms>= 5.0.0-RC1, < 5.8.21, >= 4.0.0-RC1, < 4.16.17CVE List
craftcms/cms (Packagist)from 5.0.0-RC1 before 5.8.21, from 4.0.0-RC1 before 4.16.17GitHub Advisory Database
craftcms craft_cmsfrom 4.0.0.1 before 4.16.17, from 5.0.1 before 5.8.21, 4.0.0, 5.0.0NVD

All scores

GitHub_M5.2medium CVSS:4.0CVSS: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
GitHubmedium CVSS:4.0CVSS: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
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-1336

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

Sources

SourceRecordLicence
CVE ListCVE-2025-68454 changed 2026-01-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-742x-x762-7383 changed 2026-02-03CC-BY-4.0
NVDCVE-2025-68454 changed 2026-10-07Public domain