CVE-2024-54149: Winter/wn cms module Winter CMS Modules Allows A Vulnerability

HIGH
Advisory Identifier: GHSA-xhw3-4j3m-hq53
CVSS 8.4
CWE-184
Published
Advisory Summary

CVE-2024-54149 is a HIGH (CVSS 8.4) winter cms modules allows a vulnerability (CWE-184: Incomplete List of Disallowed Inputs) affecting Winter/wn cms module libraries in the Packagist ecosystem. The issue involves winter cms modules allows a sandbox bypass in twig templates leading to data modification and deletion. Remediation is available by upgrading affected packages to version 1.2.7, 1.1.11, 1.0.476.

CVE-2024-54149 at a Glance

CVE Identifier CVE-2024-54149
GHSA Identifier GHSA-xhw3-4j3m-hq53
Severity HIGH
CVSS v3.1 Base Score 8.4
CWE Classification CWE-184: Incomplete List of Disallowed Inputs
Affected Product Winter/wn cms module
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-54149

To remediate this vulnerability, upgrade all affected Winter/wn cms module dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

winter/wn-cms-module fixed: 1.2.7
Upgrade winter/wn-cms-module to 1.2.7
winter/wn-cms-module fixed: 1.1.11
Upgrade winter/wn-cms-module to 1.1.11
winter/wn-cms-module fixed: 1.0.476
Upgrade winter/wn-cms-module to 1.0.476
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for winter/wn-cms-module

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-54149, inspect your project dependencies for Winter/wn cms module:

inspect dependencies for winter/wn-cms-module

Analyze the terminal output to locate any version of Winter/wn cms module in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-184: Incomplete List of Disallowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete. In Winter/wn cms module, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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_layouts` - `cms.manage_pages` - `cms.manage_partials` The Winter CMS maintainers strongly recommend that these permissions only be reserved to trusted administrators and developers in general. ### Patches 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. ### 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.

CVE-2024-54149 Affected Winter/wn cms module Versions

3 component(s)
Fixed Versions:
1.2.71.1.111.0.476
Product / Package Ecosystem Affected Versions Fixed Version
winter/wn-cms-module
Packagist
≥ 1.2.0
< 1.2.7
1.2.7
winter/wn-cms-module
Packagist
≥ 1.1.0
< 1.1.11
1.1.11
winter/wn-cms-module
Packagist
< 1.0.476
1.0.476

References

Frequently Asked Questions

What is CVE-2024-54149?
CVE-2024-54149 is a security vulnerability in Winter/wn cms module involving Winter CMS Modules allows a sandbox bypass in Twig templates leading to data modification and deletion under CWE-184: Incomplete List of Disallowed Inputs.
Which Winter/wn cms module versions are affected?
Affected versions include releases prior to 1.2.7, 1.1.11, 1.0.476 across affected packages: winter/wn-cms-module.
What version fixes CVE-2024-54149?
Upgrading to 1.2.7, 1.1.11, 1.0.476 (or the latest patched release for your respective branch) resolves the vulnerability.
Is winter/wn-cms-module affected?
Yes, winter/wn-cms-module is affected in releases prior to 1.2.7, 1.1.11, 1.0.476. Upgrade your dependency to 1.2.7, 1.1.11, 1.0.476 or later.
What is the CVSS score of CVE-2024-54149?
CVE-2024-54149 has a CVSS v3.1 base score of 8.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-54149?
CVE-2024-54149 is classified under CWE-184: Incomplete List of Disallowed Inputs (The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.).
How can I check Packagist dependencies for CVE-2024-54149?
Run the dependency tree command: 'inspect dependencies for winter/wn-cms-module'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xhw3-4j3m-hq53",
  "modified" : "2024-12-09T21:54:05Z",
  "published" : "2024-12-09T20:41:41Z",
  "aliases" : [ "CVE-2024-54149" ],
  "summary" : "Winter CMS Modules allows a sandbox bypass in Twig templates leading to data modification and deletion",
  "details" : "### Impact\n\nAffected 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.\n\nAs 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.\n\nTo actively exploit this security issue, an attacker would need access to the Backend with a user account with any of the following permissions:\n- `cms.manage_layouts`\n- `cms.manage_pages`\n- `cms.manage_partials`\n\nThe Winter CMS maintainers strongly recommend that these permissions only be reserved to trusted administrators and developers in general.\n\n### Patches\n\nIn order to mitigate this issue, we have significantly increased the scope of the sandbox, effectively making all models and datasources read-only in Twig.\n\nThis security issue has been fixed as of https://github.com/wintercms/winter/commit/fb88e6fabde3b3278ce1844e581c87dcf7daee22.\n\n### Workarounds\n\nIf you cannot upgrade, you may apply commit https://github.com/wintercms/winter/commit/fb88e6fabde3b3278ce1844e581c87dcf7daee22 to your Winter CMS installation manually to resolve this issue.\n\nIn 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "winter/wn-cms-module"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.0"
      }, {
        "fixed" : "1.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "winter/wn-cms-module"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "1.1.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "winter/wn-cms-module"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.476"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/security/advisories/GHSA-xhw3-4j3m-hq53"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-54149"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/commit/fb88e6fabde3b3278ce1844e581c87dcf7daee22"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wintercms/winter"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-184" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-09T20:41:41Z",
    "nvd_published_at" : "2024-12-09T21:15:08Z"
  }
}