Rapid7 Vulnerability & Exploit Database

OpenTSDB 2.4.1 unauthenticated command injection

Back to Search

OpenTSDB 2.4.1 unauthenticated command injection

Disclosed
07/01/2023
Created
09/08/2023

Description

This module exploits an unauthenticated command injection vulnerability in the key parameter in OpenTSDB through 2.4.1 (CVE-2023-36812/CVE-2023-25826) in order to achieve unauthenticated remote code execution as the root user. The module first attempts to obtain the OpenTSDB version via the api. If the version is 2.4.1 or lower, the module performs additional checks to obtain the configured metrics and aggregators. It then randomly selects one metric and one aggregator and uses those to instruct the target server to plot a graph. As part of this request, the key parameter is set to the payload, which will then be executed by the target if the latter is vulnerable. This module has been successfully tested against OpenTSDB version 2.4.1.

Author(s)

  • Gal Goldstein
  • Daniel Abeles
  • Erik Wynter

Platform

Linux

Architectures

ARCH_CMD

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/opentsdb_key_cmd_injection
msf exploit(opentsdb_key_cmd_injection) > show targets
    ...targets...
msf exploit(opentsdb_key_cmd_injection) > set TARGET < target-id >
msf exploit(opentsdb_key_cmd_injection) > show options
    ...show and set options...
msf exploit(opentsdb_key_cmd_injection) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;