CVE-2025-68454: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in craftcms cms
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.
AI Analysis
Technical Summary
CVE-2025-68454 is a vulnerability classified under CWE-1336, involving improper neutralization of special elements in the Twig template engine used by Craft CMS. The affected versions span from 4.0.0-RC1 to 4.16.16 and 5.0.0-RC1 to 5.8.20. The flaw enables authenticated users to perform Server-Side Template Injection (SSTI) by injecting malicious Twig code into text fields that accept Twig input, such as those found in the Craft Control Panel's Settings or the System Messages utility. The attack vector requires either administrator access with the allowAdminChanges setting enabled—which is discouraged in production environments—or a non-administrator account with access to the System Messages utility. The vulnerability leverages the Twig 'map' filter to craft payloads that execute arbitrary code on the server, leading to Remote Code Execution (RCE). The CVSS v4.0 score is 5.2 (medium), reflecting the need for authentication and specific configuration, but also the high impact on confidentiality, integrity, and availability if exploited. No public exploits have been observed, but the vulnerability poses a significant risk to environments where these conditions are met. Mitigation involves upgrading to patched versions 5.8.21 or 4.16.17, which address the improper neutralization issue in the template engine.
Potential Impact
For European organizations using Craft CMS, this vulnerability could lead to severe consequences if exploited. An attacker gaining RCE capabilities can compromise the confidentiality, integrity, and availability of web applications and underlying systems. This could result in data breaches, defacement, unauthorized access to sensitive information, and disruption of services. The requirement for authenticated access and specific configuration settings reduces the likelihood of widespread exploitation but does not eliminate risk, especially in environments where administrative controls are lax or where non-admin users have elevated privileges. Organizations in sectors such as government, finance, healthcare, and e-commerce, which often rely on CMS platforms for digital presence, could face reputational damage, regulatory penalties under GDPR, and operational downtime. The absence of known exploits in the wild provides a window for proactive remediation before attackers develop weaponized payloads targeting this vulnerability.
Mitigation Recommendations
European organizations should immediately verify their Craft CMS versions and update to 5.8.21 or 4.16.17 to apply the security patches. Additionally, they should audit user roles and permissions to ensure that only trusted administrators have access to the Control Panel and that the allowAdminChanges setting is disabled in production environments. Restrict access to the System Messages utility to minimize the risk posed by non-administrator accounts. Implement strict input validation and sanitization for any fields accepting Twig input, and consider disabling Twig template parsing in user-editable fields if not required. Employ network segmentation and web application firewalls (WAFs) to detect and block suspicious payloads targeting template injection. Regularly monitor logs for unusual activity related to template rendering or administrative actions. Finally, conduct security awareness training for administrators to recognize the risks of enabling unsafe configurations.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Belgium, Poland, Ireland
CVE-2025-68454: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in craftcms cms
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-68454 is a vulnerability classified under CWE-1336, involving improper neutralization of special elements in the Twig template engine used by Craft CMS. The affected versions span from 4.0.0-RC1 to 4.16.16 and 5.0.0-RC1 to 5.8.20. The flaw enables authenticated users to perform Server-Side Template Injection (SSTI) by injecting malicious Twig code into text fields that accept Twig input, such as those found in the Craft Control Panel's Settings or the System Messages utility. The attack vector requires either administrator access with the allowAdminChanges setting enabled—which is discouraged in production environments—or a non-administrator account with access to the System Messages utility. The vulnerability leverages the Twig 'map' filter to craft payloads that execute arbitrary code on the server, leading to Remote Code Execution (RCE). The CVSS v4.0 score is 5.2 (medium), reflecting the need for authentication and specific configuration, but also the high impact on confidentiality, integrity, and availability if exploited. No public exploits have been observed, but the vulnerability poses a significant risk to environments where these conditions are met. Mitigation involves upgrading to patched versions 5.8.21 or 4.16.17, which address the improper neutralization issue in the template engine.
Potential Impact
For European organizations using Craft CMS, this vulnerability could lead to severe consequences if exploited. An attacker gaining RCE capabilities can compromise the confidentiality, integrity, and availability of web applications and underlying systems. This could result in data breaches, defacement, unauthorized access to sensitive information, and disruption of services. The requirement for authenticated access and specific configuration settings reduces the likelihood of widespread exploitation but does not eliminate risk, especially in environments where administrative controls are lax or where non-admin users have elevated privileges. Organizations in sectors such as government, finance, healthcare, and e-commerce, which often rely on CMS platforms for digital presence, could face reputational damage, regulatory penalties under GDPR, and operational downtime. The absence of known exploits in the wild provides a window for proactive remediation before attackers develop weaponized payloads targeting this vulnerability.
Mitigation Recommendations
European organizations should immediately verify their Craft CMS versions and update to 5.8.21 or 4.16.17 to apply the security patches. Additionally, they should audit user roles and permissions to ensure that only trusted administrators have access to the Control Panel and that the allowAdminChanges setting is disabled in production environments. Restrict access to the System Messages utility to minimize the risk posed by non-administrator accounts. Implement strict input validation and sanitization for any fields accepting Twig input, and consider disabling Twig template parsing in user-editable fields if not required. Employ network segmentation and web application firewalls (WAFs) to detect and block suspicious payloads targeting template injection. Regularly monitor logs for unusual activity related to template rendering or administrative actions. Finally, conduct security awareness training for administrators to recognize the risks of enabling unsafe configurations.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-12-17T20:22:35.081Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 695c36383839e44175942eae
Added to database: 1/5/2026, 10:07:52 PM
Last enriched: 1/5/2026, 10:22:54 PM
Last updated: 1/8/2026, 2:28:41 PM
Views: 16
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-21895: CWE-703: Improper Check or Handling of Exceptional Conditions in RustCrypto RSA
LowCVE-2025-8307: CWE-257 Storing Passwords in a Recoverable Format in Asseco InfoMedica Plus
MediumCVE-2025-8306: CWE-1220 Insufficient Granularity of Access Control in Asseco InfoMedica Plus
MediumCVE-2025-14025: Incorrect Execution-Assigned Permissions in Red Hat Red Hat Ansible Automation Platform 2
HighCVE-2026-21891: CWE-287: Improper Authentication in IceWhaleTech ZimaOS
CriticalActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.