GHSA-7F2F-2H5V-CQ8P
Cross-Site Request Forgery in admin delete handlers accepting GET requests
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-7F2F-2H5V-CQ8P divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Several NukeViet CMS administration handlers performed state-changing database operations in response to `GET` requests without carrying a per-request anti-CSRF token. Because the framework's cross-site origin check applies to `POST` — the correct design, since `GET` is defined as a safe method by RFC 9110 §9.2.1 — handlers that violated that contract were left outside every CSRF control.
The contact module deletion handler was the most severe instance: a single `GET` request truncated all stored contact submissions and replies. An attacker who persuaded an authenticated contact administrator to follow a link could destroy all contact data without holding any account of their own.
Details
The affected handlers read their action trigger from the query string and executed destructive SQL with no token check:
| Handler | Input source | Operation |
| --- | --- | --- |
| `modules/contact/admin/del.php` | `t` from `get` | `t=3` → `TRUNCATE` of `*_contact_send` and `*_contact_reply`; `t=1&id=N` → single-row `DELETE` |
| `modules/comment/admin/del.php` | `list` from `post,get` | `DELETE` of comments by `cid` |
| `modules/news/admin/topicdelnews.php` | `list` from `post,get` | `UPDATE ... SET topicid=0`, unassigning articles from a topic |
For the contact handler, `GET` was the intended transport — the administration UI triggered it through `window.location`. For the comment and news handlers the UI already used `POST`; accepting `post,get` widened them unnecessarily and discarded the framework's protection.
The root cause is a violation of HTTP safe-method semantics in application code, not a gap in the framework. `vendor/vinades/nukeviet/Core/Request.php` behaves as intended and is not modified by this fix: cross-origin `POST` is covered by its `Origin`/`Referer` check, and every method beyond `GET`/`HEAD`/`POST` is covered by the browser-enforced CORS preflight.
Exploitation. The session cookie ships with `SameSite=Lax` by default. `Lax` blocks cross-site sub-resource requests, so an `<img>`-based forgery does not work against a default installation; it does, by design, send cookies on top-level `GET` navigation. A plain link, a `meta refresh`, or an HTTP redirect was therefore sufficient. The `str_referer_blocker` setting is disabled by default and, when enabled, only rejects requests that carry a foreign `Referer` — an attacker suppressing the header with `rel="noreferrer"` bypassed it. Administrative session validation (`nv_admin_checkip`, `nv_admin_checkfirewall`, `nv_admin_checkdata`) verifies the client IP, user agent, and session check number, all of which match because the request originates from the victim's own browser.
Impact
An attacker with no account on the target site could cause an authenticated administrator's browser to perform destructive actions:
- Contact module — complete and irreversible loss of all stored contact submissions and replies.
- Comment module — deletion of comments by identifier.
- News module — articles unassigned from a topic.
Exploitation requires the victim to be signed in with administrative access to the affected module and to follow an attacker-supplied link. There is no confidentiality impact; no data is disclosed to the attacker.
Affected Versions
- NukeViet CMS 4.6.x — 4.6.01 and earlier
- NukeViet CMS 4.5.x — 4.5.11 and earlier
Patched Versions
- NukeViet CMS 4.6.02
- NukeViet CMS 4.5.12
Remediation
Update to a patched release. The fix moves the affected actions to `POST` and adds token validation:
- `modules/contact/admin/del.php` now requires `POST`, validates a `csrf_check()` token, and restricts `t` to a known set of actions.
- `modules/comment/admin/del.php` and `modules/news/admin/topicdelnews.php` now read their input from `POST` only.
Workaround. Administrators who cannot update immediately can set the session cookie policy to `Strict` (Settings → Configuration → `cookie SameSite`). Unlike the default `Lax`, `Strict` withholds the session cookie on cross-site top-level navigation, so a forged link arrives unauthenticated. The trade-off is that any legitimate inbound link from an external site — search results, e-mail, chat — also arrives signed out until the user navigates within the site.
Restricting the administration area by IP does not mitigate this issue: the forged request originates from the victim administrator's own browser and therefore from an already-permitted address.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistnukeviet/nukeviet |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/nukeviet/nukeviet/security/advisories/GHSA-7f2f-2h5v-cq8pLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
