CVE-2026-63179: Winter Local File Inclusion Through @import Vulnerability

MODERATE
Advisory Identifier: GHSA-58fp-mcx6-7qf9
CVSS 4.9
CWE-22
Published
Advisory Summary

CVE-2026-63179 is a MODERATE (CVSS 4.9) local file inclusion through @import vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Winter libraries in the Packagist ecosystem. The issue involves local file inclusion through @import directives in less compilation of backend customizable stylesheets and theme assets. Remediation is available by upgrading affected packages to version 1.2.13.

CVE-2026-63179 at a Glance

CVE Identifier CVE-2026-63179
GHSA Identifier GHSA-58fp-mcx6-7qf9
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Winter
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.9

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:N/S:U/C:H/I:N/A:N).

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

How to Fix CVE-2026-63179

To remediate this vulnerability, upgrade all affected Winter 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.13
Upgrade winter/wn-backend-module to 1.2.13
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-2026-63179, inspect your project dependencies for Winter:

inspect dependencies for winter/wn-backend-module

Analyze the terminal output to locate any version of Winter in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.13), 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, 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 authenticated backend users with the following permissions to disclose arbitrary files readable by the PHP process by injecting `@import (inline) "<path>"` directives into LESS source that the backend compiles. Four entry points share the same root cause: - **Brand Settings** `BrandSetting.custom_css` field (`backend.manage_branding`) — compiled inline into every backend page's `<style>` block. - **Editor Settings** `EditorSetting.html_custom_styles` field (`backend.manage_editor`) — compiled inline into every backend page's `<style>` block. - **Mail Brand Settings** `MailBrandSetting` colour-picker fields (`system.manage_mail_templates`) — values are concatenated into LESS source via `Less_Parser::ModifyVars()` with no escaping, so any value the form validator does not reject can carry an `@import` directive. - **Theme `.less`/`.sass`/`.scss` assets** (`cms.manage_assets`) — compiled through `System\Classes\CombineAssets` when served, with the same `Less_Parser` configuration. Both absolute paths and `..` traversal escape from the asset's own tree were exploitable. The leaked content includes any file the web process can read, most importantly the application `.env` file (disclosing `APP_KEY` and database credentials). To actively exploit this issue, an attacker would need an authenticated backend account with one of the permissions listed above. By default these are assigned to the built-in Developer role. ### Patches The root cause is in the `wikimedia/less.php` integration in [Winter Storm](https://github.com/wintercms/storm): `Less_Parser` was instantiated without a safe import resolver, and its `Less_FileManager::getFilePath()` falls back to the raw attacker-supplied path when no candidate root matches. Storm now ships a `LessImportResolver` that uses the callable form of `Less_Parser::SetImportDirs()` to refuse any `@import` whose resolved path lies outside the calling context's allowed roots, defeating both absolute paths and `..` traversal at the parser level. The four sinks have been updated to use the resolver. The three settings models pass no allowed roots (deny-all) because the bundled stylesheets ship no `@import` directives and the user fields have no legitimate use for them. `System\Classes\CombineAssets` configures the theme-asset compiler with `themes_path()`, `plugins_path()`, and `base_path('modules')` as allowed roots, preserving real cross-tree imports observed in shipped themes and plugins. This security issue has been fixed in [v1.2.13](https://github.com/wintercms/winter/commit/130f0ea43e9228bf0d129b481da1cdfbcc4b4456) (Winter core) and [v1.2.13](https://github.com/wintercms/storm/commit/af770331c683e628533a6ec2991285d6e10a4d6c) (Winter Storm). ### Workarounds If you cannot upgrade, apply https://github.com/wintercms/storm/commit/af770331c683e628533a6ec2991285d6e10a4d6c and https://github.com/wintercms/winter/commit/130f0ea43e9228bf0d129b481da1cdfbcc4b4456 manually. As an interim mitigation, remove `cms.manage_assets` from any non-trusted role and clear any non-empty value from the Brand Settings `custom_css` and Editor Settings `html_custom_styles` fields. ### References See https://github.com/octobercms/october/security/advisories/GHSA-3888-q23f-x7qh for the related (but distinct in scope) October CMS advisory addressing the theme-asset compiler path. The Brand/Editor/Mail Brand Settings sinks reported in this advisory are not covered by the October patch. Credit to Nguyen Van Hiep ([@hypnguyen1209](https://github.com/hypnguyen1209)) from Lo Security for reporting the issue. ### For more information If you have any questions or comments about this advisory: - Email us at [hello@wintercms.com](mailto:hello@wintercms.com)

CVE-2026-63179 Affected Winter Versions

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

References

Frequently Asked Questions

What is CVE-2026-63179?
CVE-2026-63179 is a security vulnerability in Winter involving Local File Inclusion through @import directives in LESS compilation of backend customizable stylesheets and theme assets under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Winter versions are affected?
Affected versions include releases prior to 1.2.13 across affected packages: winter/wn-backend-module.
What version fixes CVE-2026-63179?
Upgrading to 1.2.13 (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.13. Upgrade your dependency to 1.2.13 or later.
What is the CVSS score of CVE-2026-63179?
CVE-2026-63179 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-63179?
CVE-2026-63179 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-2026-63179?
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-58fp-mcx6-7qf9",
  "modified" : "2026-08-20T18:43:33Z",
  "published" : "2026-08-20T18:43:33Z",
  "aliases" : [ "CVE-2026-63179" ],
  "summary" : "Winter: Local File Inclusion through @import directives in LESS compilation of backend customizable stylesheets and theme assets",
  "details" : "### Impact\n\nAffected versions of Winter CMS allow authenticated backend users with the following permissions to disclose arbitrary files readable by the PHP process by injecting `@import (inline) \"<path>\"` directives into LESS source that the backend compiles. Four entry points share the same root cause:\n\n- **Brand Settings** `BrandSetting.custom_css` field (`backend.manage_branding`) — compiled inline into every backend page's `<style>` block.\n- **Editor Settings** `EditorSetting.html_custom_styles` field (`backend.manage_editor`) — compiled inline into every backend page's `<style>` block.\n- **Mail Brand Settings** `MailBrandSetting` colour-picker fields (`system.manage_mail_templates`) — values are concatenated into LESS source via `Less_Parser::ModifyVars()` with no escaping, so any value the form validator does not reject can carry an `@import` directive.\n- **Theme `.less`/`.sass`/`.scss` assets** (`cms.manage_assets`) — compiled through `System\\Classes\\CombineAssets` when served, with the same `Less_Parser` configuration. Both absolute paths and `..` traversal escape from the asset's own tree were exploitable.\n\nThe leaked content includes any file the web process can read, most importantly the application `.env` file (disclosing `APP_KEY` and database credentials).\n\nTo actively exploit this issue, an attacker would need an authenticated backend account with one of the permissions listed above. By default these are assigned to the built-in Developer role.\n\n### Patches\n\nThe root cause is in the `wikimedia/less.php` integration in [Winter Storm](https://github.com/wintercms/storm): `Less_Parser` was instantiated without a safe import resolver, and its `Less_FileManager::getFilePath()` falls back to the raw attacker-supplied path when no candidate root matches. Storm now ships a `LessImportResolver` that uses the callable form of `Less_Parser::SetImportDirs()` to refuse any `@import` whose resolved path lies outside the calling context's allowed roots, defeating both absolute paths and `..` traversal at the parser level.\n\nThe four sinks have been updated to use the resolver. The three settings models pass no allowed roots (deny-all) because the bundled stylesheets ship no `@import` directives and the user fields have no legitimate use for them. `System\\Classes\\CombineAssets` configures the theme-asset compiler with `themes_path()`, `plugins_path()`, and `base_path('modules')` as allowed roots, preserving real cross-tree imports observed in shipped themes and plugins.\n\nThis security issue has been fixed in [v1.2.13](https://github.com/wintercms/winter/commit/130f0ea43e9228bf0d129b481da1cdfbcc4b4456) (Winter core) and [v1.2.13](https://github.com/wintercms/storm/commit/af770331c683e628533a6ec2991285d6e10a4d6c) (Winter Storm).\n\n### Workarounds\n\nIf you cannot upgrade, apply https://github.com/wintercms/storm/commit/af770331c683e628533a6ec2991285d6e10a4d6c and https://github.com/wintercms/winter/commit/130f0ea43e9228bf0d129b481da1cdfbcc4b4456 manually. As an interim mitigation, remove `cms.manage_assets` from any non-trusted role and clear any non-empty value from the Brand Settings `custom_css` and Editor Settings `html_custom_styles` fields.\n\n### References\n\nSee https://github.com/octobercms/october/security/advisories/GHSA-3888-q23f-x7qh for the related (but distinct in scope) October CMS advisory addressing the theme-asset compiler path. The Brand/Editor/Mail Brand Settings sinks reported in this advisory are not covered by the October patch.\n\nCredit to Nguyen Van Hiep ([@hypnguyen1209](https://github.com/hypnguyen1209)) from Lo Security for reporting the issue.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n- Email us at [hello@wintercms.com](mailto:hello@wintercms.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "winter/wn-backend-module"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.13"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.2.12"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/security/advisories/GHSA-58fp-mcx6-7qf9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/storm/commit/af770331c683e628533a6ec2991285d6e10a4d6c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/commit/130f0ea43e9228bf0d129b481da1cdfbcc4b4456"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wintercms/winter"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/releases/tag/v1.2.13"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-20T18:43:33Z",
    "nvd_published_at" : null
  }
}