GHSA-hq84-x37p-j6q5: XSS

Published Aug 20, 2026
·
Updated

Impact

Affected versions of Winter CMS render the search query parameter without HTML encoding inside a <script type="text/template"> block in the backend Table widget partial (modules/backend/widgets/table/partials/table.php):

php value="<?= get('search') ?>"

<script> is an HTML raw-text context, so the surrounding value="…" attribute quoting is not a parser boundary. A literal </script> in the query string terminates the template element early, and everything after it is parsed as ordinary markup in the backend document.

Any backend page rendering a Table or DataTable widget is a sink. The value is read from the global request through the get() helper, which — unlike post() — is not restricted by HTTP method, so a plain top-level GET navigation is sufficient. The template is also emitted unconditionally by the partial, so widgets using the default searching: false configuration are equally affected.

In Winter core the reachable route is the Editor Settings form (/backend/system/settings/update/winter/backend/editor), which renders six datatable fields and is gated by backend.manageeditor — assigned by default to the built-in Developer role. Third-party plugins using the datatable form widget, or the Table widget directly, expose the same sink on their own pages.

An attacker who induces a signed-in backend user to follow a crafted link executes script in that user's authenticated backend origin. The injected script can read the CSRF token published in the backend layout's <meta name="csrf-token"> element and issue credentialed requests as the victim, bounded only by that user's permissions. Because the core sink requires backend.manageeditor, the practical victim is a Developer-role user or superuser — who can edit CMS templates, so script running in that session can chain to server-side code execution.

This is not a permission bypass: the victim must already be authorised for the page, and the attacker gains no permission the victim does not hold.

To actively exploit this issue, an attacker needs no account of their own, but does need an authenticated backend user with access to a page rendering a Table or DataTable widget to follow an attacker-supplied link.

Patches

The search value is now HTML-encoded on output, matching every other value rendered by the same partial and the equivalent handling in the backend Search widget (modules/backend/widgets/search/partials/search.php):

php value="<?= e(get('search')); ?>"

This removes the raw-text terminator: the browser can no longer encounter an attacker-supplied literal </script> while tokenising the document. The template is subsequently parsed once by jQuery when the toolbar is built, so an encoded payload resolves to an inert attribute string rather than markup.

Regression coverage was added in modules/backend/tests/widgets/TableSearchEscapingTest.php, covering plain, mixed-case (</ScRiPt>) and whitespace-bearing (</script >) terminators, both searching states, and preservation of ordinary and Unicode search text.

This security issue has been fixed in v1.2.14.

Workarounds

If you cannot upgrade, apply https://github.com/wintercms/winter/commit/1b6397654124fb44a6abf6f3782b6a1d746cef14 manually — in modules/backend/widgets/table/partials/table.php, change:

php value="<?= get('search') ?>"

to:

php value="<?= e(get('search')); ?>"

A restrictive Content Security Policy served at the web server or reverse proxy can reduce practical exploitability, but it is not a substitute for the fix: Winter's backend ships inline scripts, so a policy permissive enough to run the backend may still permit an injected execution primitive.

References

Credit to Awwader (@NRAwwad) 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.0.420<=1.2.13
1.2.14

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.14
  2. Upgrade

    Upgrade wintercms/winter to a version that resolves this vulnerability.

    Fixed in v1.2.14Patch 1b6397654124fb44a6abf6f3782b6a1d746cef14
  3. Configuration

    In modules/backend/widgets/table/partials/_table.php, within the inline `<script type="text/template">` used for the Table widget search, change the rendered template field so the `search` query parameter is HTML-encoded on output: replace `value="<?= get('search') ?>"` with `value="<?= e(get('search')); ?>"`. (As described in commit 1b6397654124fb44a6abf6f3782b6a1d746cef14).

    Winter CMS backend Table widget partial (modules/backend/widgets/table/partials/_table.php) search query parameter output encoding in <script type="text/template"> = value="<?= e(get('search')); ?>" (instead of unencoded get('search') / raw-text terminator)
  4. Compensating control

    If you cannot upgrade, deploy a restrictive Content Security Policy served at the web server or reverse proxy to reduce practical exploitability (note: not a substitute for the fix because Winter backend ships inline scripts).

  5. Compensating control

    Apply access control to reduce who can reach pages that render the Table/DataTable widgets: the reachable sink route in Winter core is gated by `backend.manage_editor` on the Editor Settings form (`/backend/system/settings/update/winter/backend/editor`), which is assigned by default to the built-in Developer role.

Event History

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

Frequently Asked Questions

1

Can this be triggered with a normal browser request?

Yes. The value is read from the global request via get(), which is not limited to a particular HTTP method, so a top-level GET navigation with a crafted search parameter is sufficient.

2

Does disabling table searching prevent exposure?

No. The affected template is emitted unconditionally by the Table widget partial, so widgets configured with the default searching: false setting are also affected.

3

Which built-in backend location is known to render the affected widget?

The Editor Settings form at /backend/system/settings/update/winter/backend/editor is identified as a reachable core route. It renders six datatable fields and requires the backend.manage_editor permission.

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