Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTJjeGYtNjU2Ny03cHA2

Local Information Disclosure Vulnerability

Impact

Local information disclosure of sensitive information downloaded via the API using the API Client.

Finding

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 vulnerability was found due to this query that Jonathan Leitschuh contributed to the Semmle QL project.

Patches

This issue has been patched in version 1.0.0-beta.9.

See also Remove unused downloadFile helpers.

Workarounds

The recommended workaround is to 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.

References

For more information

If you have any questions or comments about this advisory:

Permalink: https://github.com/advisories/GHSA-2cxf-6567-7pp6
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTJjeGYtNjU2Ny03cHA2
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: about 3 years ago
Updated: about 1 year ago


CVSS Score: 3.0
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:N/A:N

Identifiers: GHSA-2cxf-6567-7pp6, CVE-2021-21331
References: Repository: https://github.com/DataDog/datadog-api-client-java
Blast Radius: 2.9

Affected Packages

maven:com.datadoghq:datadog-api-client
Dependent packages: 1
Dependent repositories: 9
Downloads:
Affected Version Ranges: >= 1.0.0-beta.6, < 1.0.0-beta.9
Fixed in: 1.0.0-beta.9
All affected versions: 1.0.0-beta.6, 1.0.0-beta.7
All unaffected versions: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.1, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0, 2.15.0, 2.16.0, 2.17.0, 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.22.0, 2.23.0, 2.24.0