GHSA-fm29-4mq3-phg6: CSRF

Published Aug 20, 2026
·
Updated

Impact

Affected versions of Winter CMS did not enforce the ImportExportController behavior's granular access control on the handlers that actually perform the work.

The behavior supports per-operation access control through the import[permissions] and export[permissions] configuration keys, enforced by userHasAccess(). That check was applied only to the import() and export() page actions.

Backend\Classes\Controller::execAjaxHandlers() dispatches AJAX handlers and returns before execPageAction() runs, and the behavior binds its import and export form widgets in its constructor on every request to the controller. The handlers were therefore fully functional without the gated page action ever executing, and none of them carried the check:

- onImport() — reaches $model->import() with attacker-supplied column mappings - onImportLoadForm() - onImportLoadColumnSampleForm() - onExport() — reaches $model->export() - onExportLoadForm() - download() — streams a completed export file

An authenticated backend user who could reach such a controller through its coarse $requiredPermissions, but who was denied the granular import or export permission, could therefore:

- exfiltrate the entire dataset exposed by the export model, via onExport() followed by download(); and - write or overwrite records through the import model, via onImport().

userHasAccess() is default-permissive — it returns true unless the corresponding permissions key is configured — so only controllers that declare granular import/export permissions were affected. Those are precisely the controllers whose authors opted in to restricting these operations, and for which the configuration silently had no effect on the paths that mattered.

Note that CSRF tokens are still verified on all POST requests, so the attacker must be logged into the backend with a valid session.

To actively exploit this issue, an attacker would need a backend account with access to a controller that implements this behavior and declares an import[permissions] or export[permissions] value more restrictive than that controller's own $requiredPermissions.

Patches

userHasAccess() is now enforced on every handler and action that performs or exposes an import or export operation: onImport(), onImportLoadForm(), onImportLoadColumnSampleForm(), onExport(), onExportLoadForm(), and the download() action.

Because the check remains default-permissive, controllers that never configured granular permissions are unaffected. The only behavioural change is for controllers that did configure the gate — which is the intended fix.

Regression coverage was added in modules/backend/tests/behaviors/ImportExportControllerPermissionsTest.php, covering denial of each guarded entry point, proof that the underlying import() and export() model sinks are never reached, positive controls confirming a user who does hold the granular permissions is still able to import and export, and a control confirming that controllers without the configuration continue to work.

This security issue has been fixed in v1.2.14.

Workarounds

If you cannot upgrade, apply https://github.com/wintercms/winter/commit/84c81f153f2dc3e2c7b03ab14a4a3ca8456d0e4f manually, adding the following to each of the methods listed above (using 'export' for onExport(), onExportLoadForm() and download()):

php if (!$this->userHasAccess('import')) { abort(403); }

As an interim mitigation, express the restriction in the affected controller's own $requiredPermissions property instead of relying solely on the behavior's granular keys. That check is enforced in Backend\Classes\Controller before any AJAX handler is dispatched, so it covers the handlers as well as the page actions.

References

Credit to Jace (@manus-use) 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.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 to a fixed release to a version that resolves this vulnerability.

    Fixed in v1.2.14Patch 84c81f153f2dc3e2c7b03ab14a4a3ca8456d0e4f
  3. Configuration

    If you cannot upgrade: apply commit 84c81f153f2dc3e2c7b03ab14a4a3ca8456d0e4f manually and add the access check/abort to each method listed in the advisory: onExport() (use 'export'), onExportLoadForm() (use 'export'), download() (use 'export'), onImport() (use 'import'), onImportLoadForm() (use 'import'), and onImportLoadColumnSampleForm() (use 'import'), aborting with 403 when !$this->userHasAccess('<import|export>').

    Winter CMS (ImportExportController behavior) userHasAccess() enforcement = enforce granular access checks for import/export on handlers
  4. Configuration

    As an interim mitigation (if you cannot upgrade): express the restriction in the affected controller's own $requiredPermissions instead of relying solely on the behavior's granular import/export keys (import[permissions] / export[permissions]).

    Affected controller (ImportExportController usage) $requiredPermissions = add explicit import/export restrictions

Event History

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

Frequently Asked Questions

1

Which users can exploit this issue?

An authenticated backend user is affected by this access-control gap if they can reach a controller through its coarse requiredPermissions setting but are denied that controller's granular import or export permission.

2

What must be present in the application configuration for the gap to matter?

The controller must use the ImportExportController behavior and configure per-operation access restrictions with import[permissions] or export[permissions]. The issue is relevant when those granular permissions are intended to further restrict users who already have the controller's coarse access permission.

3

Which operations could be reached without the intended granular permission check?

The reachable handlers include onImport, onImportLoadForm, onImportLoadColumnSampleForm, onExport, onExportLoadForm, and download. This could allow import processing with attacker-supplied column mappings, export processing, and downloading a completed export file.

4

How can an administrator identify potentially affected controllers?

Review backend controllers that use ImportExportController, have broad requiredPermissions that grant user access, and define import[permissions] or export[permissions]. Then determine whether users denied the granular permissions can invoke the listed AJAX handlers or download endpoint.

5

What can be done if updating is not immediately possible?

Restrict the controller's coarse requiredPermissions so that users who lack the intended import or export permission cannot reach the controller. This removes the prerequisite access needed to invoke the handlers.

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