Executive brief
Grav Admin is a web-based content management interface for the Grav CMS. It fails to sanitize dangerous HTML generated from markdown text before displaying it to users. Attackers can inject malicious links via plugin or theme changelogs in Grav's package manager, allowing unauthenticated adversaries to execute arbitrary JavaScript in authenticated admin sessions without requiring prior site access.
Technical details
The vulnerability is a stored/reflected cross-site scripting (XSS) flaw in the MarkdownEditor.svelte and MarkdownModal.svelte components. These components call marked.parse() on markdown content and inject the resulting HTML directly into the DOM via Svelte's {@html} directive without applying any sanitization (no DOMPurify or custom safe renderer). The marked library does not sanitize dangerous URI schemes like javascript: by default, relying on callers to perform sanitization. The vulnerability manifests in two paths: (1) self-XSS or collaborator-XSS via the markdown editor's live preview when a user types a malicious markdown link, and (2) unauthenticated arbitrary code execution via plugin or theme changelogs loaded from the GPM package listing, where third-party-authored content containing payloads like [click](javascript:alert(1)) is rendered without sanitization. Fixed in version 2.0.20 by introducing proper output sanitization before DOM injection.
Affected products
- Grav Admin before 2.0.20
Timeline
- 2026-08-20: advisory: GitHub security advisory GHSA-752r-88j4-vxm3 published
- 2026-09-04: disclosed: CVE-2026-85601 and NVD disclosure
- 2026-09-04: patched: Patched in version 2.0.20