vendor:
OCS Inventory NG
by:
Ephreet
7,5
CVSS
HIGH
SQL Injection and Code Execution
89
CWE
Product Name: OCS Inventory NG
Affected Version From: <=2.2
Affected Version To: <=2.2
Patch Exists: NO
Related CWE: N/A
CPE: ocsinventory-ng
Metasploit:
N/A
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: Debian 3.2.73-2+deb7u2 (MySQL 5.5.47-0+deb7u1, Apache/2.2.22), CentOS 6/7
2016
OCS Inventory NG <= 2.2 - Search with various criteria SQL Injection and Code execution
Custom search allows for SQL Injection, while default configuration allows for file write as MySQL user. Search field fails to escape MySQL special characters, allowing file creation and code execution. If permissions are not carefully set, one could write to web/crontab folders.
Mitigation:
Run MySQL/Apache services as restricted user. Restrict file write permissions to ocs DB user. Watch out for weak permissions on /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/conf/ (it is often set to full write by inexperienced admins).