Summary
Winter CMS Modules allows a sandbox bypass in Twig templates leading to data modification and deletion
Workarounds
If you cannot upgrade, you may apply commit https://github.com/wintercms/winter/commit/fb88e6fabde3b3278ce1844e581c87dcf7daee22 to your Winter CMS installation manually to resolve this issue.
In the rare event that you were relying on being able to write to models/datasources within your Twig templates, you should instead use or create components to make changes to your models.
Impact
Affected versions of Winter CMS allow users with access to the CMS templates sections that modify Twig files to bypass the sandbox placed on Twig files and modify resources such as theme customisation values or modify, or remove, templates in the theme even if not provided direct access via the permissions.
As all objects passed through to Twig are references to the live objects, it is also possible to also manipulate model data if models are passed directly to Twig, including changing attributes or even removing records entirely. In most cases, this is unwanted behavior and potentially dangerous.
To actively exploit this security issue, an attacker would need access to the Backend with a user account with any of the following permissions:
cms.manage_layoutscms.manage_pagescms.manage_partials
The Winter CMS maintainers strongly recommend that these permissions only be reserved to trusted administrators and developers in general.
CVE-2024-54149 has a CVSS score of 8.4 (High). The vector is network-reachable, high privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.2.7, 1.1.11, 1.0.476); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
In order to mitigate this issue, we have significantly increased the scope of the sandbox, effectively making all models and datasources read-only in Twig.
This security issue has been fixed as of https://github.com/wintercms/winter/commit/fb88e6fabde3b3278ce1844e581c87dcf7daee22.
Frequently Asked Questions
- What is CVE-2024-54149? CVE-2024-54149 is a high-severity security vulnerability in winter/wn-cms-module (composer), affecting versions >= 1.2.0, < 1.2.7. It is fixed in 1.2.7, 1.1.11, 1.0.476.
- How severe is CVE-2024-54149? CVE-2024-54149 has a CVSS score of 8.4 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of winter/wn-cms-module are affected by CVE-2024-54149? winter/wn-cms-module (composer) versions >= 1.2.0, < 1.2.7 is affected.
- Is there a fix for CVE-2024-54149? Yes. CVE-2024-54149 is fixed in 1.2.7, 1.1.11, 1.0.476. Upgrade to this version or later.
- Is CVE-2024-54149 exploitable, and should I be worried? Whether CVE-2024-54149 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2024-54149 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2024-54149?
- Upgrade
winter/wn-cms-moduleto 1.2.7 or later - Upgrade
winter/wn-cms-moduleto 1.1.11 or later - Upgrade
winter/wn-cms-moduleto 1.0.476 or later
- Upgrade