CVE-2023-36812: Opentsdb Remote Code Execution Vulnerability
CRITICALCVE-2023-36812 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Opentsdb libraries in the Maven ecosystem. The issue involves remote code execution for 2.4.1 and earlier. Remediation is available by upgrading affected packages to version 2.4.2.
CVE-2023-36812 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-36812
To remediate this vulnerability, upgrade all affected Opentsdb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>net.opentsdb</groupId>
<artifactId>opentsdb</artifactId>
<version>2.4.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=net.opentsdb
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-36812, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=net.opentsdb
Analyze the terminal output to locate any version of Opentsdb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=net.opentsdb command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Opentsdb, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-36812 Affected Opentsdb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
net.opentsdb:opentsdb
|
Maven |
< 2.4.2
|
2.4.2
|
References
Frequently Asked Questions
What is CVE-2023-36812?
Which Opentsdb versions are affected?
What version fixes CVE-2023-36812?
Is opentsdb affected?
What is the CVSS score of CVE-2023-36812?
What CWE is associated with CVE-2023-36812?
How can I check Maven dependencies for CVE-2023-36812?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-76f7-9v52-v2fw",
"modified" : "2023-06-30T22:58:41Z",
"published" : "2023-06-30T22:58:41Z",
"aliases" : [ "CVE-2023-36812" ],
"summary" : "Remote Code Execution for 2.4.1 and earlier",
"details" : "### Impact\nOpenTSDB is vulnerable to Remote Code Execution vulnerability by writing user-controlled input to Gnuplot configuration file and running Gnuplot with the generated configuration.\n\n### Patches\nPatched in [07c4641471c6f5c2ab5aab615969e97211eb50d9](https://github.com/OpenTSDB/opentsdb/commit/07c4641471c6f5c2ab5aab615969e97211eb50d9) and further refined in https://github.com/OpenTSDB/opentsdb/commit/fa88d3e4b5369f9fb73da384fab0b23e246309ba\n\n### Workarounds\nDisable Gunuplot via `tsd.core.enable_ui = true` and remove the shell files https://github.com/OpenTSDB/opentsdb/blob/master/src/mygnuplot.bat and https://github.com/OpenTSDB/opentsdb/blob/master/src/mygnuplot.sh.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "net.opentsdb:opentsdb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.4.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.4.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/OpenTSDB/opentsdb/security/advisories/GHSA-76f7-9v52-v2fw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36812"
}, {
"type" : "WEB",
"url" : "https://github.com/OpenTSDB/opentsdb/commit/07c4641471c6f5c2ab5aab615969e97211eb50d9"
}, {
"type" : "WEB",
"url" : "https://github.com/OpenTSDB/opentsdb/commit/fa88d3e4b5369f9fb73da384fab0b23e246309ba"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/OpenTSDB/opentsdb"
}, {
"type" : "WEB",
"url" : "http://packetstormsecurity.com/files/174570/OpenTSDB-2.4.1-Unauthenticated-Command-Injection.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-30T22:58:41Z",
"nvd_published_at" : "2023-06-30T23:15:10Z"
}
}