Grav CMS Cross-site scripting (XSS) vulnerabilityGHSA-977g-93f5-rqjx
MEDIUMGHSA-977g-93f5-rqjx is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in getgrav/grav. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for getgrav/grav — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
getgrav/gravReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Cross-site scripting (XSS) vulnerability in system/src/Grav/Common/Twig/Twig.php in Grav CMS before 1.3.0 allows remote attackers to inject arbitrary web script or HTML via the PATH_INFO to admin/tools.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | getgrav/grav | all versions | 1.3.0composer require getgrav/grav:^1.3.0 |
Affected Products
grav cmsgetgravResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for getgrav/grav, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update getgrav/grav to 1.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-977g-93f5-rqjx is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
How to detect GHSA-977g-93f5-rqjx
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id ghsa-977g-93f5-rqjx -u https://target- Template
- Grav CMS <1.3.0 - Cross-Site Scripting
- Severity
- medium
- Impact
- Attackers can execute arbitrary JavaScript in victims' browsers, potentially stealing session cookies, administrative credentials, or performing actions on behalf of authenticated users.
- Remediation
- Upgrade Grav CMS to version 1.3.0 or later, which includes proper input sanitization to mitigate the XSS vulnerability.
Template by ProjectDiscovery nuclei-templates (pikpikcu), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is GHSA-977g-93f5-rqjx in your dependencies?
Find it across Packagist, including transitive dependencies.