Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. winter/wn-system-module
  4. ›
  5. GHSA-2223-f22x-24cq

GHSA-2223-f22x-24cq: Winter: Local File Inclusion through =include directives in JavaScript asset compilation

August 20, 2026

Affected versions of Winter CMS allow authenticated backend users with the cms.manage_assets permission (“Manage website assets - images, JavaScript files, CSS files”) to disclose arbitrary files readable by the PHP process by placing an =include / =require directive in a theme JavaScript asset.

Winter\Storm\Parse\Assetic\Filter\JavascriptImporter processes =include / =require directives found in comment blocks of JavaScript assets passed through System\Classes\CombineAssets. The directive target was resolved relative to the including file’s own directory with realpath() and inlined into the combined output with no confinement check, so a directive such as =include ../../../.env escaped the theme’s asset tree and inlined an arbitrary server-readable file. The only restriction was that the target had to have a file extension, since extension-less names had .js appended to them.

Because the combined output is served through the combine/{file} route, which performs no authentication or authorization checks, the disclosed contents then became readable by unauthenticated visitors at a stable URL as soon as the asset was referenced by any template.

The leaked content includes any file the web process can read, most importantly the application .env file (disclosing APP_KEY and database credentials). Text files were disclosed intact; binary content was mangled by the minification pipeline.

This is the JavaScript-importer counterpart of GHSA-58fp-mcx6-7qf9 (Local File Inclusion through LESS @import directives) and of CVE-2023-52085 / GHSA-2x7r-93ww-cxrq — the same vulnerability class reached through a different asset combiner filter.

To actively exploit this issue, an attacker would need an authenticated backend account with the cms.manage_assets permission. By default this permission is assigned to the built-in Developer role. The Winter CMS maintainers strongly recommend that the cms.manage_assets permission only be reserved to trusted administrators and developers in general, as it grants direct write access to files that are combined and served publicly.

References

  • github.com/advisories/GHSA-2223-f22x-24cq
  • github.com/wintercms/storm/commit/fd673f4f32140c97c68b1ed705764b819747fbdf
  • github.com/wintercms/winter/commit/e09c8d3526f3583cb6c3476a021b885088ecd4bd
  • github.com/wintercms/winter/releases/tag/v1.2.13
  • github.com/wintercms/winter/security/advisories/GHSA-2223-f22x-24cq

Code Behaviors & Features

Detect and mitigate GHSA-2223-f22x-24cq with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.2.13

Fixed versions

  • 1.2.13

Solution

Upgrade to version 1.2.13 or above.

Impact 4.9 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

packagist/winter/wn-system-module/GHSA-2223-f22x-24cq.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 10 Sep 2026 00:19:52 +0000.