GHSA-p2ch-c2c3-4xm5 is a medium-severity (CVSS 6.1) vulnerability in winter/wn-backend-module. O3 Security confirms whether GHSA-p2ch-c2c3-4xm5 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Winter: CSRF through AJAX handler names reachable as backend page actions
Real-World Exposure
winter/wn-backend-moduleReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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 thancomingSoon()— and dashed URLs are normalised tosnake_case, so/coming-soonnow resolves tocoming_soon()instead ofcomingSoon(). 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 [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | winter/wn-backend-module | ≥ 1.0.319&&< 1.2.14 | 1.2.14 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for winter/wn-backend-module. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update winter/wn-backend-module to 1.2.14 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-p2ch-c2c3-4xm5 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-p2ch-c2c3-4xm5 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-p2ch-c2c3-4xm5. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-p2ch-c2c3-4xm5 in your dependencies?
O3 detects GHSA-p2ch-c2c3-4xm5 across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.