CVE-2023-52085: Winter/wn backend module Winter CMS Local File Inclusion Vulnerability

LOW
Advisory Identifier: GHSA-2x7r-93ww-cxrq
CVSS 3.3
CWE-22
Published
Advisory Summary

CVE-2023-52085 is a LOW (CVSS 3.3) winter cms local file inclusion vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Winter/wn backend module libraries in the Packagist ecosystem. The issue involves winter cms local file inclusion through server side template injection. Remediation is available by upgrading affected packages to version 1.2.4.

CVE-2023-52085 at a Glance

CVE Identifier CVE-2023-52085
GHSA Identifier GHSA-2x7r-93ww-cxrq
Severity LOW
CVSS v3.1 Base Score 3.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Winter/wn backend module
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 3.3

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

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

How to Fix CVE-2023-52085

To remediate this vulnerability, upgrade all affected Winter/wn backend 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-backend-module fixed: 1.2.4
Upgrade winter/wn-backend-module to 1.2.4
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-backend-module

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-52085, inspect your project dependencies for Winter/wn backend module:

inspect dependencies for winter/wn-backend-module

Analyze the terminal output to locate any version of Winter/wn backend 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.4), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Winter/wn backend 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 Users with access to backend forms that include a [ColorPicker FormWidget](https://wintercms.com/docs/v1.2/docs/backend/forms#color-picker) can provide a value that would then be included without further processing in the compilation of custom stylesheets via LESS. This had the potential to lead to a Local File Inclusion vulnerability. By default, only the Brand Settings (backend.manage_branding) and Mail Brand Settings (system.manage_mail_templates) forms both include the colorpicker formwidget and pass the provided value to be compiled in LESS, however it is also common for themes to include it on their Theme Customization (cms.manage_theme_options) form and it is technically possible for the values on that form to also be used in LESS compilation: https://wintercms.com/docs/v1.2/docs/themes/development#asset-compiler-variables. ### Patches This issue has been patched in v1.2.4. ### Workarounds Apply https://github.com/wintercms/winter/commit/5bc9257fe2bc47d8b786a1b1bf96bafad23d8ddd manually if unable to upgrade to v1.2.4.

CVE-2023-52085 Affected Winter/wn backend module Versions

1 component(s)
Fixed Versions:
1.2.4
Product / Package Ecosystem Affected Versions Fixed Version
winter/wn-backend-module
Packagist
< 1.2.4
1.2.4

References

Frequently Asked Questions

What is CVE-2023-52085?
CVE-2023-52085 is a security vulnerability in Winter/wn backend module involving Winter CMS Local File Inclusion through Server Side Template Injection under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Winter/wn backend module versions are affected?
Affected versions include releases prior to 1.2.4 across affected packages: winter/wn-backend-module.
What version fixes CVE-2023-52085?
Upgrading to 1.2.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is winter/wn-backend-module affected?
Yes, winter/wn-backend-module is affected in releases prior to 1.2.4. Upgrade your dependency to 1.2.4 or later.
What is the CVSS score of CVE-2023-52085?
CVE-2023-52085 has a CVSS v3.1 base score of 3.3 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2023-52085?
CVE-2023-52085 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Packagist dependencies for CVE-2023-52085?
Run the dependency tree command: 'inspect dependencies for winter/wn-backend-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-2x7r-93ww-cxrq",
  "modified" : "2024-01-02T14:10:26Z",
  "published" : "2024-01-02T14:10:26Z",
  "aliases" : [ "CVE-2023-52085" ],
  "summary" : "Winter CMS Local File Inclusion through Server Side Template Injection ",
  "details" : "### Impact\nUsers with access to backend forms that include a [ColorPicker FormWidget](https://wintercms.com/docs/v1.2/docs/backend/forms#color-picker) can provide a value that would then be included without further processing in the compilation of custom stylesheets via LESS. This had the potential to lead to a Local File Inclusion vulnerability.\n\nBy default, only the Brand Settings (backend.manage_branding) and Mail Brand Settings (system.manage_mail_templates) forms both include the colorpicker formwidget and pass the provided value to be compiled in LESS, however it is also common for themes to include it on their Theme Customization (cms.manage_theme_options) form and it is technically possible for the values on that form to also be used in LESS compilation: https://wintercms.com/docs/v1.2/docs/themes/development#asset-compiler-variables.\n\n### Patches\nThis issue has been patched in v1.2.4.\n\n### Workarounds\nApply https://github.com/wintercms/winter/commit/5bc9257fe2bc47d8b786a1b1bf96bafad23d8ddd manually if unable to upgrade to v1.2.4.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "winter/wn-backend-module"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/security/advisories/GHSA-2x7r-93ww-cxrq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-52085"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/commit/5bc9257fe2bc47d8b786a1b1bf96bafad23d8ddd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wintercms/winter"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-02T14:10:26Z",
    "nvd_published_at" : "2023-12-29T00:15:50Z"
  }
}