Vulnerability record · CVE-2020-35476 · published 16 December 2020
CVE-2020-35476: OpenTSDB yrange parameter command injection enables remote code execution
Opentsdb · Opentsdb
OpenTSDB through 2.4.0 writes the user-supplied yrange parameter into a gnuplot file under /tmp, which is then executed by the mygnuplot.sh shell script. The attempted backtick filter in tsd/GraphHandler.java is insufficient, so shell metacharacters in yrange lead to OS command injection. This matters because the endpoint is network-reachable and unauthenticated, giving full compromise of the OpenTSDB host.
Description
A remote code execution vulnerability occurs in OpenTSDB through 2.4.0 via command injection in the yrange parameter. The yrange value is written to a gnuplot file in the /tmp directory. This file is then executed via the mygnuplot.sh shell script. (tsd/GraphHandler.java attempted to prevent command injections by blocking backticks but this is insufficient.)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityUnauthenticated network-reachable RCE with a 9.8 CVSS score and very high EPSS probability, with public exploit references available.
What it is
OpenTSDB through 2.4.0 writes the user-supplied yrange parameter into a gnuplot file under /tmp, which is then executed by the mygnuplot.sh shell script. The attempted backtick filter in tsd/GraphHandler.java is insufficient, so shell metacharacters in yrange lead to OS command injection. This matters because the endpoint is network-reachable and unauthenticated, giving full compromise of the OpenTSDB host.
Impact
An unauthenticated remote attacker can execute arbitrary OS commands with the privileges of the OpenTSDB process, leading to full host compromise, data theft, and use of the server as a pivot point.
Attack surface
Reached over the network through the graphing/query HTTP interface that accepts the yrange parameter; the CVSS vector shows no privileges or user interaction required. Any exposed OpenTSDB graphing endpoint is a candidate.
Exploitation
Not listed in CISA KEV, but EPSS is 0.8533 (99.7th percentile) and public references are tagged Exploit, indicating working exploit code is publicly available. No ransomware usage is documented.
What to do
- Upgrade OpenTSDB past 2.4.0 to a release that fixes the yrange command injection; if no fixed release is available, treat the graphing endpoint as untrusted.
- Restrict network access to the OpenTSDB HTTP/graphing interface with firewall rules or a reverse proxy, allowing only trusted management hosts.
- Run OpenTSDB as a dedicated low-privilege account with no shell and no access to sensitive files or the /tmp execution path.
- Sanitize or reject shell metacharacters in the yrange parameter at the proxy/WAF layer as a stopgap, and remove or disable the gnuplot execution path if graphing is not needed.
- Monitor and harden the /tmp directory (noexec where feasible) to limit execution of attacker-written gnuplot scripts.
Detection
- Inspect OpenTSDB HTTP access logs for requests with yrange values containing shell metacharacters such as ;, |, $(), or newlines.
- Monitor process creation on OpenTSDB hosts for child processes spawned by the Java service, especially gnuplot and shell interpreters.
- Watch for new or modified files in /tmp matching gnuplot script patterns and for execution of mygnuplot.sh.
- Alert on outbound network connections or unexpected command execution from the OpenTSDB service account.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| http://packetstormsecurity.com/files/170331/OpenTSDB-2.4.0-Command-Injection.html | ExploitThird Party AdvisoryVDB Entry |
| https://github.com/OpenTSDB/opentsdb/issues/2051 | ExploitIssue TrackingThird Party Advisory |
| http://packetstormsecurity.com/files/170331/OpenTSDB-2.4.0-Command-Injection.html | ExploitThird Party AdvisoryVDB Entry |
| https://github.com/OpenTSDB/opentsdb/issues/2051 | ExploitIssue TrackingThird Party Advisory |
Track CVE-2020-35476 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2020-35476), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.