Skip to content

DataDog API Client contains a Local Information Disclosure Vulnerability

Moderate
JLLeitschuh published GHSA-c69w-942w-45c7 Feb 25, 2022

Package

maven com.datadoghq:datadog-api-client (Maven)

Affected versions

< 1.0.0-beta.9

Patched versions

1.0.0-beta.9

Description

Disclosure By Vendor

GHSA-2cxf-6567-7pp6

Description

Utilizing a custom CodeQL query written as a part of the GitHub Security Lab Bug Bounty program, I've unearthed a local information disclosure vulnerability in this OSS repository.

This particular vulnerability impacts DataDog/datadog-api-client-java

You can see the custom CodeQL query utilized here:
https://lgtm.com/query/8938575359870595124/

This vulnerability exists in the ApiClient for version 1 and 2.
The method prepareDownloadFilecreates 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 by downloadFileFromResponsewill be visible to all other users on the local system.

Exploit Scenario

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.

Resources

Impact

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

Severity

Moderate

CVE ID

CVE-2021-21331

Weaknesses

Credits