high CVSS 8.4

CVE-2024-54149·PHP vulnerability

Winter is a free, open-source content management system (CMS) based on the Laravel PHP framework. Winter CMS prior to versions 1.2.7, 1.1.11, and 1.0.476 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_layouts`; `cms.manage_pages`; or `cms.manage_partials`. The Winter CMS maintainers strongly recommend that these permissions only be reserved to trusted administrators and developers in general. The maintainers of Winter CMS have significantly increased the scope of the sandbox, effectively making all models and datasources read-only in Twig, in versions 1.2.7, 1.1.11, and 1.0.476. Thse who cannot upgrade may apply commit fb88e6fabde3b3278ce1844e581c87dcf7daee22 to their Winter CMS installation manually to resolve the issue. In the rare event that a Winter user was relying on being able to write to models/datasources within their Twig templates, they should instead use or create components to make changes to their models.

Severity
high
Software
PHP
Fixed in
1.2.7
Published
2024-12-09

Affected versions

From: 1.2.0

Until: 1.2.7

Fixed in: 1.2.7

How to fix this CVE

Winter CMS installations running versions 1.2.0 through 1.2.6 must be upgraded to version 1.2.7 or later to patch a critical Twig sandbox bypass vulnerability. This flaw allows authenticated backend users with template management permissions to escape sandbox restrictions and directly manipulate theme data and models. If immediate upgrade is not possible, apply commit fb88e6fabde3b3278ce1844e581c87dcf7daee22 manually to your Winter CMS installation.

sudo dnf update php php-common php-cli php-fpm

Defensia detects this vulnerability

How to check if you are affected

  1. Check your Winter CMS version by examining the version constant in config/app.php or the composer.lock file: grep -i 'version' config/app.php | head -5
  2. List all backend user accounts with CMS template management permissions by querying the database: SELECT * FROM backend_users WHERE role_id IN (SELECT id FROM backend_roles WHERE permissions LIKE '%cms.manage_layouts%' OR permissions LIKE '%cms.manage_pages%' OR permissions LIKE '%cms.manage_partials%');
  3. Search backend audit logs for suspicious Twig template modifications: grep -r 'modify.*twig\|template.*change' storage/logs/ --include='*.log'
  4. Verify the patched version by checking the Winter CMS version string matches 1.2.7 or higher: php -r "echo \\Winter\\System\\Classes\\Version::VERSION;" or inspect composer.lock for wintercms/winter version field

FAQ

What is CVE-2024-54149?

CVE-2024-54149 is a Twig sandbox bypass vulnerability in Winter CMS that allows authenticated backend users with template editing permissions to escape sandbox restrictions, directly manipulate theme configuration, models, and datasources despite permission controls intended to prevent such access.

Is CVE-2024-54149 being actively exploited?

No, CVE-2024-54149 is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available, though the vulnerability is readily exploitable by any authenticated user with the specified backend permissions.

What versions of Winter CMS are affected by CVE-2024-54149?

Winter CMS versions 1.2.0 through 1.2.6 are affected. Versions 1.0.476, 1.1.11, and 1.2.7 or later contain the patch.

How do I check if my server is vulnerable to CVE-2024-54149?

Run: php -r "require 'bootstrap/app.php'; echo \\Winter\\System\\Classes\\Version::VERSION;" and verify the version is below 1.2.7. Additionally, check if backend users with cms.manage_layouts, cms.manage_pages, or cms.manage_partials permissions exist.

Does Defensia detect CVE-2024-54149?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Winter CMS or PHP is installed on a monitored server, CVE-2024-54149 will appear in your dashboard with remediation steps.

Related PHP CVEs

CVE-2026-28289CVSS 10FreeScout is a free help desk and shared inbox built with PHP's Laravel framework. A patch bypass vulnerability for CVE-2026-27636 in FreeScout 1.8.206 and earlier allows any authenticated user with file upload permissions to achieve Remote Code Execution (RCE) on the server by uploading a malicious .htaccess file using a zero-width space character prefix to bypass the security check. The vulnerability exists in the sanitizeUploadedFileName() function in app/Http/Helper.php. The function contains a Time-of-Check to Time-of-Use (TOCTOU) flaw where the dot-prefix check occurs before sanitization removes invisible characters. This vulnerability is fixed in 1.8.207.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.
CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-54149. Free for 1 server.

Get started free