CVE-2023-31506 Cross-site scripting (XSS) vulnerability in Grav
Authenticated attackers can execute arbitrary scripts via XSS in Grav CMS, potentially compromising user sessions or data.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2023-31506?
CVE-2023-31506 is a medium-severity cross-site scripting vulnerability in Getgrav Grav, published on 9 Feb 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
A cross-site scripting (XSS) vulnerability in Grav versions 1.7.44 and before, allows remote authenticated attackers to execute arbitrary web scripts or HTML via the onmouseover attribute of an ISINDEX element.
Weakness: CWE-79
Which versions are affected by CVE-2023-31506?
2 open source packages ship an affected version, including getgrav/grav. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
getgrav/grav Packagist | All versions | None |
getgrav/grav Packagist | All versions | None |
Products include Getgrav Grav.
How do I fix CVE-2023-31506?
No fix has been published for CVE-2023-31506 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2023-31506 being exploited?
There is no known exploitation of CVE-2023-31506 in the wild and no public exploit code.
Other vulnerabilities in Getgrav Grav
- CVE-2023-34251 Grav Server Side Template Injection vulnerability
- CVE-2025-46199 Cross-site scripting in n/a
- CVE-2021-47812 GravCMS 1.10.7 - Arbitrary YAML Write/Update (Unauthenticated) (2)
- CVE-2025-66844 Grav may be vulnerable to SSRF attack via Twig Templates
- CVE-2022-2073 Code Injection in getgrav/grav
Sources
Also known as GHSA-xrf8-cmrg-7436.