GHSA-58fp-mcx6-7qf9: Path Traversal

Published Aug 20, 2026
·
Updated

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.customcss field (backend.managebranding) — compiled inline into every backend page's <style> block. - Editor Settings EditorSetting.htmlcustomstyles field (backend.manageeditor) — compiled inline into every backend page's <style> block. - Mail Brand Settings MailBrandSetting colour-picker fields (system.managemailtemplates) — values are concatenated into LESS source via LessParser::ModifyVars() with no escaping, so any value the form validator does not reject can carry an @import directive. - Theme .less/.sass/.scss assets (cms.manageassets) — compiled through System\Classes\CombineAssets when served, with the same LessParser 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 APPKEY 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: LessParser was instantiated without a safe import resolver, and its LessFileManager::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 LessParser::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 themespath(), pluginspath(), and basepath('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.manageassets from any non-trusted role and clear any non-empty value from the Brand Settings customcss and Editor Settings htmlcustomstyles 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 hello@wintercms.com

Affected Software

1 affected componentFixes available
composer/winter/wn-backend-module<=1.2.12
1.2.13

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/winter/wn-backend-module to a version that resolves this vulnerability.

    Fixed in 1.2.13
  2. Upgrade

    Upgrade Winter CMS core to a version that resolves this vulnerability.

    Fixed in v1.2.13
  3. Upgrade

    Upgrade Winter Storm to a version that resolves this vulnerability.

    Fixed in v1.2.13
  4. Configuration

    As an interim mitigation, remove the `cms.manage_assets` permission from any non-trusted backend role.

    Winter CMS permissions / roles cms.manage_assets access = remove from non-trusted role(s)
  5. Configuration

    Clear any non-empty value in the Brand Settings `custom_css` field.

    Brand Settings (`backend.manage_branding`) BrandSetting.custom_css = clear to empty
  6. Configuration

    Clear any non-empty value in the Editor Settings `html_custom_styles` field.

    Editor Settings (`backend.manage_editor`) EditorSetting.html_custom_styles = clear to empty

Event History

Aug 20, 2026
Advisory Published
via GitHub·06:43 PM
Data Sourced
via GitHub·06:43 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which backend roles can trigger this issue?

An authenticated backend user needs one of these permissions: backend.manage_branding, backend.manage_editor, system.manage_mail_templates, or cms.manage_assets. Each permission corresponds to a separate injection point that reaches the same LESS compilation behavior.

2

Can an attacker read files outside a theme asset directory?

Yes. Both absolute file paths and ../ traversal from a theme asset's own tree were exploitable through .less, .sass, and .scss assets compiled by CombineAssets.

3

What data could be exposed if exploitation succeeds?

The issue can disclose arbitrary files that are readable by the PHP process. The disclosure is constrained by the filesystem permissions of that web process.

4

Where would injected content appear?

For Brand Settings and Editor Settings, the compiled content is included in the inline style block on every backend page. Theme asset content is compiled when the asset is served.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203