GHSA-58fp-mcx6-7qf9 is a medium-severity (CVSS 4.9) Path Traversal vulnerability in winter/wn-backend-module. A fix is available for winter/wn-backend-module — see the affected versions and patch details below.
Winter: Local File Inclusion through @import directives in LESS compilation of backend customizable stylesheets and theme assets
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-58fp-mcx6-7qf9.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-58fp-mcx6-7qf9 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 382,621 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
winter/wn-backend-moduleReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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_cssfield (backend.manage_branding) — compiled inline into every backend page's<style>block. - Editor Settings
EditorSetting.html_custom_stylesfield (backend.manage_editor) — compiled inline into every backend page's<style>block. - Mail Brand Settings
MailBrandSettingcolour-picker fields (system.manage_mail_templates) — values are concatenated into LESS source viaLess_Parser::ModifyVars()with no escaping, so any value the form validator does not reject can carry an@importdirective. - Theme
.less/.sass/.scssassets (cms.manage_assets) — compiled throughSystem\Classes\CombineAssetswhen served, with the sameLess_Parserconfiguration. 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: 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 (Winter core) and v1.2.13 (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) from Lo Security for reporting the issue.
For more information
If you have any questions or comments about this advisory:
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | winter/wn-backend-module | all versions | 1.2.13composer require winter/wn-backend-module:^1.2.13 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for winter/wn-backend-module, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update winter/wn-backend-module to 1.2.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-58fp-mcx6-7qf9 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is GHSA-58fp-mcx6-7qf9 in your dependencies?
Find it across Packagist, including transitive dependencies.