# GHSA-JGPJ-GCHM-6J29: Guestbook AJAX rendering allows stored XSS in administrator sessions

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

## Affected versions

- getgrav/grav-plugin-guestbook (Packagist): through 0.5.1

## Description

## Summary

Guestbook stores fields submitted by visitors and later inserts those values into HTML strings in its AJAX pagination and Admin moderation views. The strings are appended to the DOM as HTML, so markup in a stored message is interpreted by the browser.

## Affected versions

The public AJAX rendering path affects Guestbook versions through 0.5.1. The Admin moderation path, which raises the impact to administrator-session execution, affects 0.5.0 and 0.5.1.

## Details

The documented Guestbook form saves visitor-controlled author and message values to `messages.yaml`. Pagination responses return the stored records as JSON. The public `Load more` handler and the Admin `Load all` handler concatenate record fields into HTML strings and pass them to jQuery DOM insertion methods. The initial server-rendered rows use Twig escaping, but that protection does not apply to the AJAX paths. The Admin view automatically requests and inserts all records when opened.

## Impact

An unauthenticated visitor can store markup that executes when another visitor loads a later page of entries. On sites using moderation, the same stored value is automatically rendered in the authenticated Admin moderation page, crossing from anonymous input into an administrator's session.

## Patches

Upgrade to Guestbook 0.5.2 when it is released. The fix inserts visitor fields as text, rather than parsed HTML, in both AJAX views.

## Credits

Reported by @AlpetGexha.

## References

- https://github.com/getgrav/grav/security/advisories/GHSA-jgpj-gchm-6j29

Page: https://cve.now/GHSA-JGPJ-GCHM-6J29

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