CVE-2022-0970 Cross-site Scripting (XSS) - Stored in getgrav/grav
Stored Cross-Site Scripting in Grav CMS allows attackers to inject malicious scripts, potentially leading to session hijacking or code execution.
- 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
- Available
What is CVE-2022-0970?
CVE-2022-0970 is a high-severity cross-site scripting vulnerability in Getgrav Grav, published on 15 Mar 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Cross-site Scripting (XSS) - Stored in GitHub repository getgrav/grav prior to 1.7.31.
Weakness: CWE-79
Which versions are affected by CVE-2022-0970?
2 open source packages ship an affected version, including getgrav/grav. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
getgrav/grav Packagist | All versions | 1.7.31 |
getgrav/grav Packagist | All versions | 1.7.31 |
Products include Getgrav Grav.
How do I fix CVE-2022-0970?
Upgrade getgrav/grav to 1.7.31 or later.
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-2022-0970 being exploited?
There is no known exploitation of CVE-2022-0970 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-r6hh-5g3q-wwgc.