CVE-2025-57811: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in craftcms cms
Craft is a platform for creating digital experiences. From versions 4.0.0-RC1 to 4.16.5 and 5.0.0-RC1 to 5.8.6, there is a potential remote code execution vulnerability via Twig SSTI (Server-Side Template Injection). This is a follow-up to CVE-2024-52293. This vulnerability has been patched in versions 4.16.6 and 5.8.7.
AI Analysis
Technical Summary
CVE-2025-57811 is a remote code execution (RCE) vulnerability affecting Craft CMS versions from 4.0.0-RC1 up to but not including 4.16.6, and from 5.0.0-RC1 up to but not including 5.8.7. The vulnerability arises from improper neutralization of special elements used in the Twig template engine, classified under CWE-1336. Specifically, this is a Server-Side Template Injection (SSTI) vulnerability, where untrusted input is improperly sanitized or escaped before being processed by the template engine, allowing an attacker to inject and execute arbitrary code on the server. This vulnerability is a follow-up to CVE-2024-52293, indicating a recurring or related issue in the template processing logic. The vulnerability requires no user interaction and can be exploited remotely over the network without authentication, although it does require high privileges (PR:H) on the target system, which suggests that the attacker must already have some elevated access or credentials to exploit it. The CVSS 4.0 base score is 6.1, categorized as medium severity, reflecting the significant impact on confidentiality, integrity, and availability if exploited, but mitigated somewhat by the prerequisite of high privileges. The vulnerability has been patched in Craft CMS versions 4.16.6 and 5.8.7. No known exploits are currently reported in the wild. The vulnerability affects the core CMS platform used for building digital experiences, which is widely adopted for website and application content management. Exploitation could lead to full system compromise, data theft, defacement, or further lateral movement within affected environments.
Potential Impact
For European organizations, the impact of CVE-2025-57811 can be substantial. Craft CMS is used by a variety of businesses, including media companies, e-commerce platforms, and government agencies, to manage web content and digital experiences. Successful exploitation could allow attackers to execute arbitrary code on web servers, potentially leading to data breaches involving personal data protected under GDPR, service disruption, and reputational damage. Given the vulnerability requires high privileges, the risk is heightened in environments where internal threat actors or compromised credentials exist. The ability to execute code remotely without user interaction means that once an attacker gains elevated access, they can fully compromise the CMS and underlying infrastructure. This could facilitate ransomware deployment, data exfiltration, or defacement of public-facing websites, impacting customer trust and regulatory compliance. Additionally, the vulnerability's presence in multiple major versions increases the attack surface, as many organizations may not have updated to the patched versions yet. The lack of known exploits in the wild currently provides a window for mitigation, but the medium severity score and potential for high impact necessitate urgent attention.
Mitigation Recommendations
European organizations should prioritize upgrading Craft CMS installations to versions 4.16.6 or 5.8.7 or later to remediate this vulnerability. Beyond patching, organizations should implement strict access controls to limit high-privilege accounts and monitor their usage closely to reduce the risk of credential compromise. Employing Web Application Firewalls (WAFs) with custom rules to detect and block suspicious template injection patterns can provide an additional layer of defense. Regularly auditing CMS configurations and installed plugins for security best practices is recommended to prevent privilege escalation paths. Implementing robust logging and alerting on CMS administrative actions and template changes can help detect exploitation attempts early. Network segmentation to isolate CMS servers from critical backend systems reduces potential lateral movement. Finally, conducting security awareness training for administrators on the risks of privilege misuse and ensuring timely application of security updates will help maintain a strong security posture against this threat.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Belgium
CVE-2025-57811: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in craftcms cms
Description
Craft is a platform for creating digital experiences. From versions 4.0.0-RC1 to 4.16.5 and 5.0.0-RC1 to 5.8.6, there is a potential remote code execution vulnerability via Twig SSTI (Server-Side Template Injection). This is a follow-up to CVE-2024-52293. This vulnerability has been patched in versions 4.16.6 and 5.8.7.
AI-Powered Analysis
Technical Analysis
CVE-2025-57811 is a remote code execution (RCE) vulnerability affecting Craft CMS versions from 4.0.0-RC1 up to but not including 4.16.6, and from 5.0.0-RC1 up to but not including 5.8.7. The vulnerability arises from improper neutralization of special elements used in the Twig template engine, classified under CWE-1336. Specifically, this is a Server-Side Template Injection (SSTI) vulnerability, where untrusted input is improperly sanitized or escaped before being processed by the template engine, allowing an attacker to inject and execute arbitrary code on the server. This vulnerability is a follow-up to CVE-2024-52293, indicating a recurring or related issue in the template processing logic. The vulnerability requires no user interaction and can be exploited remotely over the network without authentication, although it does require high privileges (PR:H) on the target system, which suggests that the attacker must already have some elevated access or credentials to exploit it. The CVSS 4.0 base score is 6.1, categorized as medium severity, reflecting the significant impact on confidentiality, integrity, and availability if exploited, but mitigated somewhat by the prerequisite of high privileges. The vulnerability has been patched in Craft CMS versions 4.16.6 and 5.8.7. No known exploits are currently reported in the wild. The vulnerability affects the core CMS platform used for building digital experiences, which is widely adopted for website and application content management. Exploitation could lead to full system compromise, data theft, defacement, or further lateral movement within affected environments.
Potential Impact
For European organizations, the impact of CVE-2025-57811 can be substantial. Craft CMS is used by a variety of businesses, including media companies, e-commerce platforms, and government agencies, to manage web content and digital experiences. Successful exploitation could allow attackers to execute arbitrary code on web servers, potentially leading to data breaches involving personal data protected under GDPR, service disruption, and reputational damage. Given the vulnerability requires high privileges, the risk is heightened in environments where internal threat actors or compromised credentials exist. The ability to execute code remotely without user interaction means that once an attacker gains elevated access, they can fully compromise the CMS and underlying infrastructure. This could facilitate ransomware deployment, data exfiltration, or defacement of public-facing websites, impacting customer trust and regulatory compliance. Additionally, the vulnerability's presence in multiple major versions increases the attack surface, as many organizations may not have updated to the patched versions yet. The lack of known exploits in the wild currently provides a window for mitigation, but the medium severity score and potential for high impact necessitate urgent attention.
Mitigation Recommendations
European organizations should prioritize upgrading Craft CMS installations to versions 4.16.6 or 5.8.7 or later to remediate this vulnerability. Beyond patching, organizations should implement strict access controls to limit high-privilege accounts and monitor their usage closely to reduce the risk of credential compromise. Employing Web Application Firewalls (WAFs) with custom rules to detect and block suspicious template injection patterns can provide an additional layer of defense. Regularly auditing CMS configurations and installed plugins for security best practices is recommended to prevent privilege escalation paths. Implementing robust logging and alerting on CMS administrative actions and template changes can help detect exploitation attempts early. Network segmentation to isolate CMS servers from critical backend systems reduces potential lateral movement. Finally, conducting security awareness training for administrators on the risks of privilege misuse and ensuring timely application of security updates will help maintain a strong security posture against this threat.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-08-20T14:30:35.010Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 68aca540ad5a09ad004e4a39
Added to database: 8/25/2025, 6:02:40 PM
Last enriched: 8/25/2025, 6:18:09 PM
Last updated: 8/25/2025, 6:18:09 PM
Views: 2
Related Threats
Safeguarding VS Code against prompt injections
MediumCVE-2025-9415: Unrestricted Upload in GreenCMS
MediumCVE-2025-9414: Server-Side Request Forgery in kalcaddle kodbox
MediumCVE-2025-9413: SQL Injection in lostvip-com ruoyi-go
MediumCVE-2025-50383: n/a
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.