CVE-2021-21331 Vulnerability Analysis & Exploit Details

CVE-2021-21331
Vulnerability Scoring

3.0
/10
Low Risk

Security experts classify CVE-2021-21331 as a minor vulnerability with limited consequences.

Attack Complexity Details

  • Attack Complexity: High
    Exploits require significant effort and special conditions.
  • Attack Vector: Network
    Vulnerability is exploitable over a network without physical access.
  • Privileges Required: Low
    Some privileges are necessary to exploit the vulnerability.
  • Scope: Changed
    Successful exploitation can impact components beyond the vulnerable component.
  • User Interaction: Required
    User interaction is necessary for successful exploitation.

CVE-2021-21331 Details

Status: Modified

Last updated: 🕠 21 Nov 2024, 05:48 UTC
Originally published on: 🕚 03 Mar 2021, 23:15 UTC

Time between publication and last update: 1358 days

CVSS Release: version 3

CVSS3 Source

security-advisories@github.com

CVSS3 Type

Secondary

CVSS3 Vector

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

CVE-2021-21331 Vulnerability Summary

CVE-2021-21331: 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`.

Assessing the Risk of CVE-2021-21331

Access Complexity Graph

The exploitability of CVE-2021-21331 depends on two key factors: attack complexity (the level of effort required to execute an exploit) and privileges required (the access level an attacker needs).

Exploitability Analysis for CVE-2021-21331

This vulnerability, CVE-2021-21331, requires a high level of attack complexity and low privileges, making it difficult but not impossible to exploit. Organizations should ensure robust security configurations to mitigate risks.

Understanding AC and PR

A lower complexity and fewer privilege requirements make exploitation easier. Security teams should evaluate these aspects to determine the urgency of mitigation strategies, such as patch management and access control policies.

Attack Complexity (AC) measures the difficulty in executing an exploit. A high AC means that specific conditions must be met, making an attack more challenging, while a low AC means the vulnerability can be exploited with minimal effort.

Privileges Required (PR) determine the level of system access necessary for an attack. Vulnerabilities requiring no privileges are more accessible to attackers, whereas high privilege requirements limit exploitation to authorized users with elevated access.

CVSS Score Breakdown Chart

Above is the CVSS Sub-score Breakdown for CVE-2021-21331, illustrating how Base, Impact, and Exploitability factors combine to form the overall severity rating. A higher sub-score typically indicates a more severe or easier-to-exploit vulnerability.

CIA Impact Analysis

Below is the Impact Analysis for CVE-2021-21331, showing how Confidentiality, Integrity, and Availability might be affected if the vulnerability is exploited. Higher values usually signal greater potential damage.

  • Confidentiality: Low
    CVE-2021-21331 could lead to minor leaks of non-critical information without major privacy breaches.
  • Integrity: None
    CVE-2021-21331 poses no threat to data integrity.
  • Availability: None
    CVE-2021-21331 does not impact system availability.

Exploit Prediction Scoring System (EPSS)

The EPSS score estimates the probability that this vulnerability will be exploited in the near future.

EPSS Score: 0.056% (probability of exploit)

EPSS Percentile: 26.89% (lower percentile = lower relative risk)
This vulnerability is less risky than approximately 73.11% of others.

CVE-2021-21331 References

External References

CWE Common Weakness Enumeration

NVD-CWE-Other

Vulnerable Configurations

  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta1:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta1:*:*:*:*:*:*
  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta2:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta2:*:*:*:*:*:*
  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta3:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta3:*:*:*:*:*:*
  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta4:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta4:*:*:*:*:*:*
  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta5:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta5:*:*:*:*:*:*
  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta6:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta6:*:*:*:*:*:*
  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta7:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta7:*:*:*:*:*:*
  • cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta8:*:*:*:*:*:*
    cpe:2.3:a:datadoghq:datadog-api-client-java:1.0.0:beta8:*:*:*:*:*:*

Protect Your Infrastructure against CVE-2021-21331: Combat Critical CVE Threats

Stay updated with real-time CVE vulnerabilities and take action to secure your systems. Enhance your cybersecurity posture with the latest threat intelligence and mitigation techniques. Develop the skills necessary to defend against CVEs and secure critical infrastructures. Join the top cybersecurity professionals safeguarding today's infrastructures.

Other 5 Recently Published CVEs Vulnerabilities

  • CVE-2025-31203 – An integer overflow was addressed with improved input validation. This issue is fixed in macOS Sequoia 15.4, tvOS 18.4, iPadOS 17.7.6, macOS Sonoma...
  • CVE-2025-31202 – A null pointer dereference was addressed with improved input validation. This issue is fixed in iOS 18.4 and iPadOS 18.4, macOS Sequoia 15.4, tvOS ...
  • CVE-2025-31197 – The issue was addressed with improved checks. This issue is fixed in macOS Sequoia 15.4, tvOS 18.4, macOS Ventura 13.7.5, iPadOS 17.7.6, macOS Sono...
  • CVE-2025-30445 – A type confusion issue was addressed with improved checks. This issue is fixed in macOS Sequoia 15.4, tvOS 18.4, macOS Ventura 13.7.5, iPadOS 17.7....
  • CVE-2025-24271 – An access issue was addressed with improved access restrictions. This issue is fixed in macOS Sequoia 15.4, tvOS 18.4, macOS Ventura 13.7.5, iPadOS...