Executive brief
Linuxfabrik Monitoring Plugins, used for system health monitoring, contain a vulnerability that allows a local user to execute unauthorized commands with elevated privileges. By providing specially crafted input to certain plugins, such as the restic-check plugin, an attacker can bypass security restrictions and potentially gain full administrative (root) control over the system. This could lead to complete system compromise, data theft, or service disruption.
Technical details
A command injection vulnerability (CWE-78) exists in Linuxfabrik Monitoring Plugins and the underlying linuxfabrik-lib. The `lib.shell.shell_exec()` function improperly handled user-provided input by allowing command chaining via the pipe ('|') character and failing to sanitize arguments. An attacker with local access (e.g., the 'nagios' user) can provide malicious arguments to plugins often listed in sudoers, such as `restic-check --repo`, to execute arbitrary commands as root. The vulnerability was addressed in linuxfabrik-lib 5.0.0 and Monitoring Plugins v5.2.0 by transitioning to an argv list approach for command execution and disabling shell evaluation.
Affected products
- Linuxfabrik linuxfabrik-lib < 5.0.0
- Linuxfabrik Monitoring Plugins <= 5.2.0
Timeline
- 2026-06-12: disclosed: Initial disclosure by researcher
- 2026-07-06: advisory: GitHub Advisory published