# GHSA-WXR7-H5MM-C7MV: Guestbook moderation actions lack authorization and CSRF checks

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2026-09-23
- Modified: 2026-09-23

## Affected versions

- getgrav/grav-plugin-guestbook (Packagist): from 0.5.0, fixed in 0.5.2

## Description

## Summary

Guestbook's classic Admin moderation actions delete, approve, and approve-all run from route parameters without verifying the `admin.guestbook` permission or an Admin CSRF nonce.

## Affected versions

Guestbook 0.5.0 and 0.5.1 are affected.

## Details

The plugin resolves its Guestbook Admin page for accounts that can log in to Admin, then calls `fetchMessages()` during `onPageInitialized`. Its Admin branch reads `delete`, `approve`, and `approveAll` route parameters and mutates the Guestbook data immediately. The handler does not enforce the `admin.guestbook` or `admin.super` access declared by the page, and the JavaScript sends the mutations as GET requests without a nonce.

## Impact

An authenticated Admin user without Guestbook permission can delete or approve Guestbook entries. An external site can also induce an authorized moderator's browser to send a state-changing request when the session cookie is included. The direct permission bypass crosses the account's granted trust scope; the CSRF variant acts with the moderator's authority.

## Patches

Upgrade to Guestbook 0.5.2 when it is released. The fix checks the Guestbook permission before serving Admin data or actions and requires an Admin nonce for each mutation.

## Credits

Reported by @AlpetGexha.

## References

- https://github.com/getgrav/grav/security/advisories/GHSA-wxr7-h5mm-c7mv

Page: https://cve.now/GHSA-WXR7-H5MM-C7MV

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
