CVE-2021-21331 Details
Description
The Java client for the Datadog API before version 1.0.0-beta.9 has a local information disclosure of sensitive information downloaded via the API using the API Client. The Datadog API is executed on a unix-like system with multiple users. The API is used to download a file containing sensitive information. This sensitive information is exposed locally to other users. This vulnerability exists in the API Client for version 1 and 2. The method `prepareDownloadFilecreates` creates a temporary file with the permissions bits of `-rw-r--r--` on unix-like systems. On unix-like systems, the system temporary directory is shared between users. As such, the contents of the file downloaded via the `downloadFileFromResponse` method will be visible to all other users on the local system. Analysis of the finding determined that the affected code was unused, meaning that the exploitation likelihood is low. The unused code has been removed, effectively mitigating this issue. This issue has been patched in version 1.0.0-beta.9. As a workaround one may specify `java.io.tmpdir` when starting the JVM with the flag `-Djava.io.tmpdir`, specifying a path to a directory with `drw-------` permissions owned by `dd-agent`.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/DataDog/datadog-api-client-java/releases/tag/datadog-api-client-1.0.0-beta.9 | CVE | Third Party Advisory |
| https://github.com/DataDog/datadog-api-client-java/security/advisories/GHSA-2cxf-6567-7pp6 | CVE | PatchThird Party Advisory |
| https://github.com/DataDog/datadog-api-client-java/releases/tag/datadog-api-client-1.0.0-beta.9 | [email protected] | Third Party Advisory |
| https://github.com/DataDog/datadog-api-client-java/security/advisories/GHSA-2cxf-6567-7pp6 | [email protected] | PatchThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| NVD-CWE-Other | Weakness Not in a Standard CWE Category | [email protected] |
| CWE-378 | Creation of Temporary File With Insecure Permissions | [email protected] |
| CWE-379 | Creation of Temporary File in Directory with Insecure Permissions | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| datadoghq datadog-api-client-java | 1.0.0 beta1 1.0.0 beta2 1.0.0 beta3 1.0.0 beta4 1.0.0 beta5 1.0.0 beta6 1.0.0 beta7 1.0.0 beta8 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Mar 10, 2021 | Initial Analysis | [email protected] |
| Mar 4, 2021 | CVE Modified | [email protected] |