Description
OCS Inventory NG 2.7 allows Remote Command Execution via shell metacharacters to require/commandLine/CommandLine.php because mib_file in plugins/main_sections/ms_config/ms_snmp_config.php is mishandled in get_mib_oid.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 25.10 | ocsinventory-server | No fix yet | — |
| Ubuntu 24.04 LTS | ocsinventory-server | No fix yet | — |
| Ubuntu 22.04 LTS | ocsinventory-server | No fix yet | — |
| Ubuntu 20.04 LTS | ocsinventory-server | No fix yet | — |
| Ubuntu 18.04 LTS | ocsinventory-server | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | ocsinventory-server | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- OCS Inventory NG 2.7 - Remote Code Execution EDB-48634 · webapps · Jul 2, 2020
GitHub 1 repository
-
mhaskar/CVE-2020-14947 ★ 17 · Jul 2, 2020
The official exploit for OCS Inventory NG v2.7 Remote Command Execution CVE-2020-14947
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- https://gist.github.com/mhaskar/233436d3096d4a7beafe36ff61dc2c73
- https://drive.google.com/file/d/1-LVfL5ui5m2QfQxr0fDopzSECd4fTNrQ/view?usp=sharing
- https://shells.systems/ocs-inventory-ng-v2-7-remote-command-execution-cve-2020-14947/
- http://packetstormsecurity.com/files/158293/OCS-Inventory-NG-2.7-Remote-Code-Execution.html
- https://github.com/OCSInventory-NG/OCSInventory-ocsreports/commit/da72e0fddaeceee44fbbd7241e07e5d53d1eee64