The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-47748

CVE-2021-47748: Hasura GraphQL RCE Vulnerability

CVE-2021-47748 is a remote code execution vulnerability in Hasura GraphQL 1.3.3 that enables attackers to execute arbitrary commands via SQL injection. This article covers technical details, affected versions, and mitigation.

Published: January 23, 2026

CVE-2021-47748 Overview

Hasura GraphQL 1.3.3 contains a remote code execution vulnerability that allows attackers to execute arbitrary shell commands through SQL query manipulation. Attackers can inject commands into the run_sql endpoint by crafting malicious GraphQL queries that execute system commands through PostgreSQL's COPY FROM PROGRAM functionality.

Critical Impact

This vulnerability enables unauthenticated remote attackers to execute arbitrary system commands on the underlying server, potentially leading to complete system compromise, data exfiltration, and lateral movement within the network.

Affected Products

  • Hasura GraphQL Engine version 1.3.3

Discovery Timeline

  • 2026-01-21 - CVE CVE-2021-47748 published to NVD
  • 2026-01-21 - Last updated in NVD database

Technical Details for CVE-2021-47748

Vulnerability Analysis

This vulnerability is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command), commonly known as OS Command Injection. The flaw exists in how Hasura GraphQL Engine version 1.3.3 processes SQL queries through its run_sql administrative endpoint.

The vulnerability stems from insufficient input validation when handling GraphQL requests that interact with the underlying PostgreSQL database. An attacker can leverage PostgreSQL's COPY FROM PROGRAM functionality, which allows executing arbitrary shell commands as the database user. By crafting specially designed GraphQL queries targeting the run_sql endpoint, attackers can break out of the SQL context and execute system-level commands on the host server.

The network-accessible nature of this vulnerability, combined with no authentication requirements and low attack complexity, makes it particularly dangerous for exposed Hasura GraphQL instances.

Root Cause

The root cause of this vulnerability lies in the improper sanitization of user-supplied input within the run_sql endpoint. Hasura GraphQL Engine fails to adequately validate or escape SQL statements before passing them to the PostgreSQL backend. This allows attackers to inject malicious SQL that leverages PostgreSQL's COPY FROM PROGRAM feature, which is designed to execute shell commands and import their output into database tables.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker sends a crafted GraphQL mutation to the run_sql endpoint containing malicious SQL that exploits PostgreSQL's command execution capabilities. The attack flow involves:

  1. Identifying an exposed Hasura GraphQL endpoint
  2. Crafting a GraphQL mutation targeting the run_sql administrative endpoint
  3. Embedding PostgreSQL COPY FROM PROGRAM syntax within the SQL payload
  4. The payload executes arbitrary shell commands with the privileges of the PostgreSQL process

The vulnerability allows complete command execution through the abuse of PostgreSQL's COPY FROM PROGRAM functionality. Attackers craft malicious GraphQL queries containing SQL statements that leverage this PostgreSQL feature to execute arbitrary system commands. Technical details and proof-of-concept information can be found in the Exploit-DB #49802 entry.

Detection Methods for CVE-2021-47748

Indicators of Compromise

  • Unusual GraphQL queries targeting the run_sql endpoint with COPY FROM PROGRAM syntax
  • Unexpected outbound network connections from PostgreSQL or Hasura processes
  • Anomalous process spawning from the PostgreSQL service account
  • Log entries showing SQL statements containing shell command syntax

Detection Strategies

  • Monitor GraphQL query logs for requests to the run_sql endpoint containing suspicious SQL patterns
  • Implement Web Application Firewall (WAF) rules to detect and block COPY FROM PROGRAM in request payloads
  • Deploy network-level monitoring to detect command-and-control communications originating from database servers
  • Enable detailed PostgreSQL logging to capture all SQL statements executed through the database

Monitoring Recommendations

  • Configure alerting on any usage of PostgreSQL's COPY FROM PROGRAM functionality
  • Monitor for unusual process creation by the PostgreSQL or Hasura service accounts
  • Implement file integrity monitoring on critical system directories
  • Review access logs for repeated or automated requests to GraphQL administrative endpoints

How to Mitigate CVE-2021-47748

Immediate Actions Required

  • Upgrade Hasura GraphQL Engine to a patched version immediately
  • Restrict network access to Hasura GraphQL administrative endpoints using firewall rules
  • Implement authentication and authorization controls on the run_sql endpoint
  • Review PostgreSQL logs for evidence of prior exploitation attempts

Patch Information

Organizations should upgrade to a patched version of Hasura GraphQL Engine. Consult the GitHub Hasura GraphQL Engine repository for the latest security releases and upgrade instructions. Additional vulnerability details are available from the VulnCheck Hasura Advisory.

Workarounds

  • Disable or restrict access to the run_sql endpoint if not required for operations
  • Implement network segmentation to isolate Hasura GraphQL instances from untrusted networks
  • Configure PostgreSQL to revoke COPY FROM PROGRAM privileges from the Hasura database user
  • Deploy a reverse proxy with request filtering to block malicious GraphQL patterns
bash
# Configuration example - Restrict PostgreSQL COPY FROM PROGRAM
# In postgresql.conf, consider running as a restricted user
# Revoke superuser privileges from the Hasura database user
psql -c "ALTER USER hasura_user NOSUPERUSER;"

# Additionally, restrict network access to Hasura admin endpoints
# Example iptables rule to limit access to localhost only
iptables -A INPUT -p tcp --dport 8080 -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p tcp --dport 8080 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechHasura

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability0.24%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-78
  • Technical References
  • GitHub Hasura GraphQL Engine

  • Exploit-DB #49802

  • VulnCheck Hasura Advisory
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English