# GHSA-p2ch-c2c3-4xm5: Winter: CSRF through AJAX handler names reachable as backend page actions

> An attacker can trick an authenticated backend user into clicking a link to truncate logs or delete templates via CSRF in Winter CMS.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Aug 2026

## What is GHSA-p2ch-c2c3-4xm5?

GHSA-p2ch-c2c3-4xm5 is a vulnerability in winter/wn-backend-module, published on 20 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official 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 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](https://github.com/wintercms/winter/commit/353b23804dee2acf49fca996c72637040446824f).

### 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](https://github.com/NRAwwad)) for reporting the issue.

### For more information

If you have any questions or comments about this advisory:
- Email us at [hello@wintercms.com](mailto:hello@wintercms.com)

## Which versions are affected by GHSA-p2ch-c2c3-4xm5?

2 open source packages ship an affected version, including winter/wn-backend-module.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `winter/wn-backend-module` | Packagist | From 1.0.319 | 1.2.14 |
| `winter/wn-backend-module` | Packagist | From 1.0.319 | 1.2.14 |

## How do I fix GHSA-p2ch-c2c3-4xm5?

Upgrade winter/wn-backend-module to 1.2.14 or later.

## Is GHSA-p2ch-c2c3-4xm5 being exploited?

There is no known exploitation of GHSA-p2ch-c2c3-4xm5 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-p2ch-c2c3-4xm5 and fix it if it is affected.

What it is: GHSA-p2ch-c2c3-4xm5 is a vulnerability in winter/wn-backend-module, published on 20 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-p2ch-c2c3-4xm5 in the wild and no public exploit code.

Affected packages and fixed versions:
- winter/wn-backend-module (Packagist): affected from 1.0.319; fixed in 1.2.14
- winter/wn-backend-module (Packagist): affected from 1.0.319; fixed in 1.2.14

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-p2ch-c2c3-4xm5/ (Markdown: https://insights.sbomify.com/GHSA-p2ch-c2c3-4xm5/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-p2ch-c2c3-4xm5

---
From sbomify Insights: https://insights.sbomify.com/GHSA-p2ch-c2c3-4xm5/
Summaries are generated and may contain mistakes; the official description above is the record.
