GHSA-P2CH-C2C3-4XM5

Vulnerability from github – Published: 2026-08-20 18:44 – Updated: 2026-08-20 18:44
VLAI
Summary
Winter: CSRF through AJAX handler names reachable as backend page actions
Details

Impact

Affected versions of Winter CMS allow a backend AJAX handler to be invoked by a plain top-level GET navigation with no CSRF token. Backend\Classes\Controller::actionExists() accepted any public method on a controller as a page action, so handler-shaped names were never reserved from URL dispatch: an authenticated and authorized request to /backend/system/eventlogs/index_onEmptyLog reached the handler of the same name and truncated the system event log. Backend paths are routed through Route::any, and CSRF validation is skipped for HEAD, GET and OPTIONS requests.

The default SameSite=Lax session cookie is sent on top-level cross-site navigation, so a link on an attacker-controlled page is sufficient — no form, no script and no token. Handler arguments are taken from URL path segments, so the attacker also chooses the target record. Affected handlers across the backend, cms and system modules cover log truncation, resetting settings to their defaults, altering backend user state, and deleting CMS templates. None of them disclose data to the attacker or write attacker-controlled content, so the impact is destructive and state-changing rather than confidential.

To actively exploit this issue, an attacker would need no account of their own, but would need an authenticated backend user holding the relevant permission to follow an attacker-supplied link. The permissions guarding the affected handlers, system.access_logs included, are by default assigned only to the built-in Developer role.

Patches

Page-action dispatch is now restricted to all-lowercase method names, which reserves handler-shaped names (onFoo, index_onFoo) from being reached by URL. AJAX dispatch is unchanged: handlers continue to work over POST with the X-WINTER-REQUEST-HANDLER header exactly as before, and need no changes.

IMPORTANT: This fix includes a breaking change to backend action routing. A public controller method used as a page action must now be named in lowercase — coming_soon() rather than comingSoon() — and dashed URLs are normalised to snake_case, so /coming-soon now resolves to coming_soon() instead of comingSoon(). Plugins with a camelCase page action should rename the method and its view file to match; the published URL does not need to change. Core is unaffected, and a survey of the plugin ecosystem found the change affects only a small number of plugins.

This security issue has been fixed in v1.2.14.

Workarounds

If you cannot upgrade, apply https://github.com/wintercms/winter/commit/353b23804dee2acf49fca996c72637040446824f manually.

As an interim mitigation, set 'same_site' => 'strict' in config/session.php. A strict session cookie is not sent on cross-site top-level navigation, which prevents the victim's session accompanying an attacker's link. Review this against any single sign-on or inbound-link flows into your backend first, as it also affects legitimate cross-site entry.

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

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "winter/wn-backend-module"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.0.319"
            },
            {
              "fixed": "1.2.14"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-20T18:44:59Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "### Impact\n\nAffected versions of Winter CMS allow a backend AJAX handler to be invoked by a plain top-level `GET` navigation with no CSRF token. `Backend\\Classes\\Controller::actionExists()` accepted any public method on a controller as a page action, so handler-shaped names were never reserved from URL dispatch: an authenticated and authorized request to `/backend/system/eventlogs/index_onEmptyLog` reached the handler of the same name and truncated the system event log. Backend paths are routed through `Route::any`, and CSRF validation is skipped for `HEAD`, `GET` and `OPTIONS` requests.\n\nThe default `SameSite=Lax` session cookie is sent on top-level cross-site navigation, so a link on an attacker-controlled page is sufficient \u2014 no form, no script and no token. Handler arguments are taken from URL path segments, so the attacker also chooses the target record. Affected handlers across the `backend`, `cms` and `system` modules cover log truncation, resetting settings to their defaults, altering backend user state, and deleting CMS templates. None of them disclose data to the attacker or write attacker-controlled content, so the impact is destructive and state-changing rather than confidential.\n\nTo actively exploit this issue, an attacker would need no account of their own, but would need an authenticated backend user holding the relevant permission to follow an attacker-supplied link. The permissions guarding the affected handlers, `system.access_logs` included, are by default assigned only to the built-in Developer role.\n\n### Patches\n\nPage-action dispatch is now restricted to all-lowercase method names, which reserves handler-shaped names (`onFoo`, `index_onFoo`) from being reached by URL. AJAX dispatch is unchanged: handlers continue to work over `POST` with the `X-WINTER-REQUEST-HANDLER` header exactly as before, and need no changes.\n\n\u003e**IMPORTANT:** **This fix includes a breaking change to backend action routing.** A public controller method used as a page action must now be named in lowercase \u2014 `coming_soon()` rather than `comingSoon()` \u2014 and dashed URLs are normalised to `snake_case`, so `/coming-soon` now resolves to `coming_soon()` instead of `comingSoon()`. Plugins with a camelCase page action should rename the method and its view file to match; the published URL does not need to change. Core is unaffected, and a survey of the plugin ecosystem found the change affects only a small number of plugins.\n\nThis security issue has been fixed in [v1.2.14](https://github.com/wintercms/winter/commit/353b23804dee2acf49fca996c72637040446824f).\n\n### Workarounds\n\nIf you cannot upgrade, apply https://github.com/wintercms/winter/commit/353b23804dee2acf49fca996c72637040446824f manually.\n\nAs an interim mitigation, set `\u0027same_site\u0027 =\u003e \u0027strict\u0027` in `config/session.php`. A strict session cookie is not sent on cross-site top-level navigation, which prevents the victim\u0027s session accompanying an attacker\u0027s link. Review this against any single sign-on or inbound-link flows into your backend first, as it also affects legitimate cross-site entry.\n\n### References\n\nCredit to Awwader ([@NRAwwad](https://github.com/NRAwwad)) for reporting the issue.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n- Email us at [hello@wintercms.com](mailto:hello@wintercms.com)",
  "id": "GHSA-p2ch-c2c3-4xm5",
  "modified": "2026-08-20T18:44:59Z",
  "published": "2026-08-20T18:44:59Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/wintercms/winter/security/advisories/GHSA-p2ch-c2c3-4xm5"
    },
    {
      "type": "WEB",
      "url": "https://github.com/wintercms/winter/commit/353b23804dee2acf49fca996c72637040446824f"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/wintercms/winter"
    },
    {
      "type": "WEB",
      "url": "https://github.com/wintercms/winter/releases/tag/v1.2.14"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Winter: CSRF through AJAX handler names reachable as backend page actions"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…