← Vulnerability feed

Vulnerability record · CVE-2018-20434 · published 24 April 2019

CVE-2018-20434: LibreNMS addhost OS command injection via community parameter

Librenms · Librenms

LibreNMS 1.46 fails to sanitize the $_POST['community'] parameter in html/pages/addhost.inc.php when creating a new device, and the value is later mishandled by html/includes/output/capture.inc.php. An attacker can inject OS commands that execute when the snmpwalk capture endpoint is requested, giving remote code execution on the monitoring server.

9.8 CVSS 3.0 Critical EPSS 71% · top 0.6% CWE-78 · OS command injection
9.8CVSS 3.0 base score, v2 10.0
71%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
10References, 4 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

critical priorityCVSS 9.8 with no privileges or interaction required, public exploit code, and a very high EPSS score make this an urgent remote code execution risk.

What it is

LibreNMS 1.46 fails to sanitize the $_POST['community'] parameter in html/pages/addhost.inc.php when creating a new device, and the value is later mishandled by html/includes/output/capture.inc.php. An attacker can inject OS commands that execute when the snmpwalk capture endpoint is requested, giving remote code execution on the monitoring server.

Impact

An attacker gains arbitrary OS command execution as the web server user, allowing full compromise of the LibreNMS host and any credentials or network data it holds.

Attack surface

Reachable over the network through the web interface; the CVSS vector indicates no privileges and no user interaction are required, though the addhost flow is normally an authenticated administrative function.

Exploitation

Not listed in CISA KEV, but EPSS is 0.71487 (99.4th percentile) and multiple references are tagged Exploit with public technical descriptions, indicating working exploit code is available.

What to do

  • Upgrade LibreNMS to a release later than 1.46 that fixes the command injection.
  • Restrict access to the LibreNMS web interface and addhost/ajax_output endpoints to trusted administrative networks.
  • Validate and sanitize the community parameter server-side, rejecting shell metacharacters before it reaches command execution.
  • Run the LibreNMS web service under a low-privilege account with no unnecessary shell or network access.

Detection

  • Monitor web logs for requests to /ajax_output.php with type=snmpwalk and hostname=localhost or other unexpected values.
  • Alert on shell metacharacters (;, |, $(), backticks) in POST bodies to html/pages/addhost.inc.php.
  • Watch for child processes spawned by the web server user, especially snmpwalk invocations with unusual arguments.
  • Review device-add events and correlate them with subsequent outbound connections or process execution on the LibreNMS host.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2018-20434 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2022-4070Librenms insufficient session expiration vulnerabilityInsufficient Session Expiration in GitHub repository librenms/librenms prior to 22.10.0.EPSS 0.65%9.8CVE-2022-29712Librenms command injection vulnerabilityLibreNMS v22.3.0 was discovered to contain multiple command injection vulnerabilities via the service_ip, hostname, and service_param parameters.EPSS 1.7%9.8CVE-2021-44278Librenms path traversal vulnerabilityLibrenms 21.11.0 is affected by a path manipulation vulnerability in includes/html/pages/device/showconfig.inc.php.EPSS 1.5%9.8CVE-2019-10665Librenms injection vulnerabilityAn issue was discovered in LibreNMS through 1.47. The scripts that handle the graphing options (html/includes/graphs/common.inc.php and html/includes…EPSS 1.5%9.3CVE-2026-26988Librenms sql injection vulnerabilityLibreNMS is an auto-discovering PHP/MySQL/SNMP based network monitoring tool. Versions 25.12.0 and below contain an SQL Injection vulnerability in th…EPSS 0.48%9.2CVE-2026-86426Librenms improper authentication vulnerabilityLibreNMS before 26.8.0 contains an authentication bypass vulnerability in the REST API that allows unauthenticated attackers to access protected endp…EPSS 3.9%9.1CVE-2024-51092Librenms os command injection vulnerabilityLibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutController.php's index(), Settings…EPSS 7.2%9.1CVE-2019-10668Librenms missing authentication for critical function vulnerabilityAn issue was discovered in LibreNMS through 1.47. A number of scripts import the Authentication libraries, but do not enforce an actual authenticatio…EPSS 1.6%

Source: NIST National Vulnerability Database (record CVE-2018-20434), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.