Guestbook moderation actions lack authorization and CSRF checks
Description
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.