CVE-2018-20434 — librenms
CRITICALCVE-2018-20434 is a critical-severity (CVSS 9.8) OS Command Injection vulnerability in librenms/librenms. 7 public exploit or proof-of-concept references are indexed, so weaponization risk is real. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.
LibreNMS arbitrary OS commands execution
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
librenms/librenmsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
LibreNMS 1.46 allows remote attackers to execute arbitrary OS commands by using the $_POST['community'] parameter to html/pages/addhost.inc.php during creation of a new device, and then making a /ajax_output.php?id=capture&format=text&type=snmpwalk&hostname=localhost request that triggers html/includes/output/capture.inc.php command mishandling.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | librenms/librenms | all versions | No fix |
Affected Products
librenmslibrenmsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
LibreNMS 1.46 - 'addhost' Remote Code Execution
by Askar · Jun 28, 2019
LibreNMS - addhost Command Injection (Metasploit)
by Metasploit · Jun 5, 2019
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for librenms/librenms, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
The records we use list no patched version of librenms/librenms for CVE-2018-20434. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.
Mitigate without a patch
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2018-20434 in your dependencies?
Find it across Packagist, including transitive dependencies.