GHSA-pr3g-phhr-h8fh
### Summary A vulnerability has been identified that allows an authenticated administrator to execute arbitrary code on the host server. By modifying the binary path settings for built-in network tools and bypassing an input filter, an attacker with administrative privileges can download and execute malicious payloads. ### Details The application allows administrative users to configure the absolute binary paths for network diagnostic tools at `/settings/external/binaries`. This setting does not sufficiently validate ensuring the paths remain restricted to safe, intended executables. These tools are invoked by sending a request to the `GET /ajax/netcmd` endpoint. While there is an existing input filter designed to restrict arguments to valid IP addresses or hostnames, this filter can be bypassed. ### PoC To reproduce this vulnerability, a remote HTTP server should be hosted with a malicious script/executable, ensure the remote server is reachable by the server running LibreNMS. The PoC will use the file `malicious.sh` containing the following content. It will return the content of /etc/passwd and /etc/group, current working directory, username that is running the script, and it will list files of the current directory. ```bash #!/usr/bin/env bash cat /etc/passwd cat /etc/group whoami pwd ls ``` 1. Host a remote HTTP server that the server can reach and place the malicious script on the remote server. For demonstration, I will start it on localhost. <img width="593" height="481" alt="image" src="https://github.com/user-attachments/assets/ef235f8e-089b-462c-b12c-7b5ae2037fc5" /> 2. Make sure the malicious script `malicious.sh` can be downloaded. <img width="516" height="100" alt="image" src="https://github.com/user-attachments/assets/60b04755-e824-4384-81f2-2feacdc8e273" /> 3. Login with an admin account and navigate to Global Settings -> External -> Binary Locations <img width="797" height="201" alt="image" src="https://github.com/user-attachments/assets/f914
Properties
- ghsa_id
- GHSA-pr3g-phhr-h8fh
- severity
- high
- summary
- LibreNMS is Vulnerable to Remote Code Execution by Arbitrary File Write
- cve_id
- GHSA-pr3g-phhr-h8fh
- is_ghsa_only
- true
- ghsa_published
- 2026-03-26T18:04:01Z
- source_url
- https://github.com/advisories/GHSA-pr3g-phhr-h8fh
- ghsa_updated
- 2026-03-26T18:04:03Z
Related Entities (4)
AFFECTS (1)
HAS_WEAKNESS (2)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph