Linuxfabrik lib: Linuxfabrik Monitoring Plugins have local privilege escalation using embedded command (CVE-2026-55426)
### Summary When a check plugin places user provided input inside a command which is passed to `shell_exec`, an attacker can abuse this to run arbitrary commands. This is mainly dangerous for plugins which are listed in the sudoers file, because this allows an attacker controlling the nagios user to get root privileges. ### Details An example for this is the `restic-check` plugin, where the `--repo` argument is placed inside the command argument of `shell_exec`. As an example, an attacker could use the `--repo` argument `|touch /root/nagios-was-here|`. The full restic command is assembled to the string `restic --json --repo=|touch /root/nagios-was-here| --password-file= check` before it is passed to `shell_exec`. `shell_exec` then splits the command up in three parts at the | boundaries and executes the parts separately, which also executes the embedded command `touch /root/nagios-was-here`. ### PoC This PoC shows how the nagios user can use this to create a file inside `/root`. ``` nagios@test-vm:/$ sudo /usr/lib64/nagios/plugins/restic-check --repo '|touch /root/nagios-was-here|' ``` ### Impact The vulnerability is a local privilege escalation. ### Fix #### Switch from | to an array Remove the | split functionality. Instead, modify shell_exec to accept either a string or an array of strings. If an array is provided, the commands are chained together like they currently are when using |. If a string is provided, no split should be performed. You could also introduce a separate function like `shell_exec_with_user_input()` which implements this such that the current shell_exec function can stay like it is. This leaves the problem that an attacker can still specify arbitrary arguments inside a command. An example for this would be to use the `--repo` argument `sftp://example.com --cache-dir /tmp`, which would lead to the execution of: `restic --json --repo=sftp://example.com --cache-dir /tmp --password-file=None check`. Please note that this example should mainly highlight the problem in general. To prevent the problem, there is either escaping or again array-syntax. Escaping would use `shlex.quote` to place the user provided argument inside quotes and which also escapes everything which needs to be escaped. Using array syntax would mean providing the full command as an array like `['restic', '--json', '--repo', 'sftp://example.com']`. The array can then be given as-is to `Popen`. With this method, the proposed `shell_exec_with_user_input` would accept an array of array of strings. ### Patches The fix follows the array-syntax approach proposed above: * `linuxfabrik-lib` 5.0.0: `lib.shell.shell_exec()` requires the command as a list of arguments (argv) and always runs with `shell=False`. The `|` split functionality, command strings and the `shell=` parameter have been removed, so user-provided input can no longer break out of a command. `lib.shell.safe_cli_value()` additionally guards positional arguments (such as an ssh destination or a ping target) against option injection, and `lib.ssh` builds argument lists as well. * Linuxfabrik Monitoring Plugins: all plugins assemble their external commands as argv lists (commit 23bb570f4). Contained in every release after v5.2.0.
AI Analysis
Technical Summary
The vulnerability arises from the use of shell_exec in Linuxfabrik Monitoring Plugins where user input is directly embedded into shell command strings. For example, the restic-check plugin places the --repo argument inside a shell_exec command string, allowing an attacker to inject additional commands separated by pipe characters. This enables local privilege escalation when the plugin is run with elevated privileges, such as via sudo for the nagios user. The fix involves removing the pipe-based command splitting and requiring commands to be passed as argument arrays to shell_exec, which disables shell interpretation and injection. Additional safeguards include escaping positional arguments and building argument lists to prevent option injection. The vulnerability is tracked as CVE-2026-55426 and affects linuxfabrik-lib versions before 5.0.0, with fixes included in linuxfabrik-lib 5.0.0 and Monitoring Plugins releases after v5.2.0.
Potential Impact
This vulnerability allows a local attacker with control over the nagios user to escalate privileges to root by injecting arbitrary commands into plugin arguments that are executed with elevated privileges. The impact includes full system compromise due to root access. The CVSS 3.1 vector rates this as AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, indicating local attack vector, low attack complexity, required privileges as low (nagios user), no user interaction, unchanged scope, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available in linuxfabrik-lib version 5.0.0 and Linuxfabrik Monitoring Plugins releases after v5.2.0. These versions remove the vulnerable pipe-based command splitting and require commands to be passed as argument arrays to shell_exec, eliminating shell injection risks. Users should upgrade to these fixed versions. The vendor advisory does not indicate any alternative mitigations or temporary workarounds. Patch status is confirmed by the vendor advisory.
Linuxfabrik lib: Linuxfabrik Monitoring Plugins have local privilege escalation using embedded command (CVE-2026-55426)
Description
### Summary When a check plugin places user provided input inside a command which is passed to `shell_exec`, an attacker can abuse this to run arbitrary commands. This is mainly dangerous for plugins which are listed in the sudoers file, because this allows an attacker controlling the nagios user to get root privileges. ### Details An example for this is the `restic-check` plugin, where the `--repo` argument is placed inside the command argument of `shell_exec`. As an example, an attacker could use the `--repo` argument `|touch /root/nagios-was-here|`. The full restic command is assembled to the string `restic --json --repo=|touch /root/nagios-was-here| --password-file= check` before it is passed to `shell_exec`. `shell_exec` then splits the command up in three parts at the | boundaries and executes the parts separately, which also executes the embedded command `touch /root/nagios-was-here`. ### PoC This PoC shows how the nagios user can use this to create a file inside `/root`. ``` nagios@test-vm:/$ sudo /usr/lib64/nagios/plugins/restic-check --repo '|touch /root/nagios-was-here|' ``` ### Impact The vulnerability is a local privilege escalation. ### Fix #### Switch from | to an array Remove the | split functionality. Instead, modify shell_exec to accept either a string or an array of strings. If an array is provided, the commands are chained together like they currently are when using |. If a string is provided, no split should be performed. You could also introduce a separate function like `shell_exec_with_user_input()` which implements this such that the current shell_exec function can stay like it is. This leaves the problem that an attacker can still specify arbitrary arguments inside a command. An example for this would be to use the `--repo` argument `sftp://example.com --cache-dir /tmp`, which would lead to the execution of: `restic --json --repo=sftp://example.com --cache-dir /tmp --password-file=None check`. Please note that this example should mainly highlight the problem in general. To prevent the problem, there is either escaping or again array-syntax. Escaping would use `shlex.quote` to place the user provided argument inside quotes and which also escapes everything which needs to be escaped. Using array syntax would mean providing the full command as an array like `['restic', '--json', '--repo', 'sftp://example.com']`. The array can then be given as-is to `Popen`. With this method, the proposed `shell_exec_with_user_input` would accept an array of array of strings. ### Patches The fix follows the array-syntax approach proposed above: * `linuxfabrik-lib` 5.0.0: `lib.shell.shell_exec()` requires the command as a list of arguments (argv) and always runs with `shell=False`. The `|` split functionality, command strings and the `shell=` parameter have been removed, so user-provided input can no longer break out of a command. `lib.shell.safe_cli_value()` additionally guards positional arguments (such as an ssh destination or a ping target) against option injection, and `lib.ssh` builds argument lists as well. * Linuxfabrik Monitoring Plugins: all plugins assemble their external commands as argv lists (commit 23bb570f4). Contained in every release after v5.2.0.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from the use of shell_exec in Linuxfabrik Monitoring Plugins where user input is directly embedded into shell command strings. For example, the restic-check plugin places the --repo argument inside a shell_exec command string, allowing an attacker to inject additional commands separated by pipe characters. This enables local privilege escalation when the plugin is run with elevated privileges, such as via sudo for the nagios user. The fix involves removing the pipe-based command splitting and requiring commands to be passed as argument arrays to shell_exec, which disables shell interpretation and injection. Additional safeguards include escaping positional arguments and building argument lists to prevent option injection. The vulnerability is tracked as CVE-2026-55426 and affects linuxfabrik-lib versions before 5.0.0, with fixes included in linuxfabrik-lib 5.0.0 and Monitoring Plugins releases after v5.2.0.
Potential Impact
This vulnerability allows a local attacker with control over the nagios user to escalate privileges to root by injecting arbitrary commands into plugin arguments that are executed with elevated privileges. The impact includes full system compromise due to root access. The CVSS 3.1 vector rates this as AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, indicating local attack vector, low attack complexity, required privileges as low (nagios user), no user interaction, unchanged scope, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available in linuxfabrik-lib version 5.0.0 and Linuxfabrik Monitoring Plugins releases after v5.2.0. These versions remove the vulnerable pipe-based command splitting and require commands to be passed as argument arrays to shell_exec, eliminating shell injection risks. Users should upgrade to these fixed versions. The vendor advisory does not indicate any alternative mitigations or temporary workarounds. Patch status is confirmed by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-798h-hpph-m24j
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-55426"]
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a4c340227e9c797195f5e57
Added to database: 07/06/2026, 23:02:26 UTC
Last enriched: 07/06/2026, 23:11:25 UTC
Last updated: 07/29/2026, 20:37:39 UTC
Views: 33
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.