CVE-2023-37154
High · 8.4CVSS
8.4
EPSS
0.5%
Published
Oct 9, 2024
CISA due date
—
Cloudanix analysis
A monitoring tool used to check remote servers can be tricked into running any command an attacker chooses, potentially letting them take over the system that watches the network.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
check_by_ssh permits injection of arbitrary commands into SSH configuration options (ProxyCommand, LocalCommand, PermitLocalCommand) by abusing ${IFS} word-splitting to bypass argument parsing and execute attacker-controlled code with the privileges of the Nagios process.
Why it matters to the business
Attackers can gain full control of the monitoring host, allowing them to disable alerting, steal credentials, move laterally into monitored systems, and disrupt operational visibility for extended periods.
How an attack unfolds
An attacker with the ability to influence Nagios service check definitions or plugin arguments crafts a malicious check_by_ssh invocation that embeds command fragments using ${IFS} inside SSH config directives; when the plugin executes, the shell expands the IFS variables and runs the injected commands instead of the intended SSH connection.
How to fix it
Upgrade nagios-plugins to the commit e8810de21be80148562b7e0168b0a62aeedffde6 or later; where immediate upgrade is impossible, restrict check_by_ssh usage to trusted hosts only and remove the plugin from any untrusted check definitions.
How to confirm the fix worked
Confirm the installed nagios-plugins tree contains commit e8810de21be80148562b7e0168b0a62aeedffde6; run the check_by_ssh binary against a test target containing ${IFS} in a ProxyCommand argument and verify the command is rejected rather than executed.
Typical attack path
- Identify a Nagios deployment using an unpatched nagios-plugins package
- Obtain write access to service definitions or the ability to trigger custom checks
- Construct a check_by_ssh command line containing ProxyCommand or LocalCommand with ${IFS} payload
- Trigger the check via Nagios scheduler or manual execution
- Obtain shell access or code execution on the Nagios host
How to detect it
Search Nagios logs and command history for check_by_ssh invocations containing ProxyCommand, LocalCommand, or PermitLocalCommand together with dollar-brace IFS sequences; inspect process execution logs for unexpected shell commands spawned by the nagios user.
- check_by_ssh.*ProxyCommand.*\$\{IFS
- check_by_ssh.*LocalCommand.*\$\{IFS
- check_by_ssh.*PermitLocalCommand.*\$\{IFS
What your security team should do
- Apply the fixed commit e8810de21be80148562b7e0168b0a62aeedffde6 to all Nagios monitoring hosts within 30 days
- Audit existing service checks for any use of check_by_ssh with user-supplied arguments
- Add the plugin to a deny-list for external or low-trust hosts until patched
- Monitor for new EPSS or KEV updates given the 737-day disclosure window
The record
check_by_ssh in Nagios nagios-plugins 2.4.5 allows arbitrary command execution via ProxyCommand, LocalCommand, and PermitLocalCommand with \${IFS}. This has been categorized both as fixed in e8810de, and as intended behavior.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | monitoring-plugins | 0 | No fix |
| Debian:12 | monitoring-plugins | 0 | No fix |
| Debian:13 | monitoring-plugins | 0 | No fix |
| Ubuntu:16.04:LTS | monitoring-plugins | 0 | No fix |
| Ubuntu:18.04:LTS | monitoring-plugins | 0 | No fix |
| Ubuntu:20.04:LTS | monitoring-plugins | 0 | No fix |
| Ubuntu:22.04:LTS | monitoring-plugins | 0 | No fix |
| Ubuntu:24.04:LTS | monitoring-plugins | 0 | No fix |
| Ubuntu:24.10 | monitoring-plugins | 0 | No fix |
| Ubuntu:25.04 | monitoring-plugins | 0 | No fix |
| Ubuntu:25.10 | monitoring-plugins | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | monitoring-plugins | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | monitoring-plugins | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | monitoring-plugins | 0 | No fix |
Related vulnerabilities
- CVE-2026-114575 A flaw has been found in TOTOLINK A950RG 4.1.2cu.5268_B20221104. CWE-77
- CVE-2026-112942 launch-editor allows users to open files with line numbers in editor from Node.js. CWE-77
- CVE-2026-55453 OpenPrinting CUPS is an open source printing system for Linux and other Unix-like… CWE-77
- CVE-2026-102827 simple-git, an interface for running git commands in any node.js application, enables… CWE-77
- CVE-2026-102826 simple-git, an interface for running git commands in any node.js application, enables… CWE-77
- CVE-2026-79945 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77
- CVE-2026-79741 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77
- CVE-2026-78493 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions… CWE-77