LibreNMS
LibreNMS 23.10.0 before 26.4.0 OS Command Injection via Hostname
LibreNMS versions >= 23.10.0 and < 26.2.0 (fixed in 26.4.0) contain an authenticated OS command injection vulnerability in libvirt discovery. When libvirt support is enabled (enable_libvirt=true), the device hostname ($this->getDevice()->hostname) is concatenated into shell commands (ssh, virsh list/dumpxml/domstate) in VminfoLibvirt.php and passed to exec() without escapeshellarg() or argument separation. An authenticated admin can set a crafted device hostname to inject arbitrary OS commands, leading to remote code execution in the discovery worker context.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 23.10.0, < 26.4.0
Fixed in 26.4.0
Mitigation
Upgrade librenms to 26.4.0 or later.
References
- Vendor advisory github.com/librenms/librenms/security/advisori…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.