Catégories
CVE-2021-21331

Vulnérabilité dans com.datadoghq:datadog-api-client (CVE-2021-21331)

Résumé

Vulnérabilité dans com.datadoghq:datadog-api-client (CVE-2021-21331). Risque d'opérations non autorisées ou de divulgation. Exploitable via prepareDownloadFilecreates. Atténuation : mise à jour vers 1.0.0-beta.9 ou plus.

Description d'origine

La description telle que publiée par la source (souvent en anglais).

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…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Résumé généré automatiquement

Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.

Une vulnérabilité référencée CVE-2021-21331 a été découverte dans com.datadoghq:datadog-api-client.
Des attaquants peuvent cibler un point d'entrée spécifique comme prepareDownloadFilecreates à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour com.datadoghq:datadog-api-client vers 1.0.0-beta.9 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « com.datadoghq:datadog-api-client CVE-2021-21331 » sur le site de l'éditeur.

CVE-2021-21331 (com.datadoghq:datadog-api-client) — CWE-378
Vecteur d'attaque : distant (réseau)
Surface d'attaque : prepareDownloadFilecreates / downloadFileFromResponse / java.io.tmpdir
Correctif : 1.0.0-beta.9 — appliquer immédiatement
Contournement : 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.
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.

❓ Quel est le problème

Une vulnérabilité (CWE-378) affecte com.datadoghq:datadog-api-client. Les attaquants atteignent le code vulnérable via prepareDownloadFilecreates.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de com.datadoghq:datadog-api-client. Surface d'attaque : prepareDownloadFilecreates / downloadFileFromResponse / java.io.tmpdir.

🔥 Gravité

Gravité : ?. Risque d'opérations non autorisées ou de divulgation.

🔧 Comment corriger

Mettre à jour vers 1.0.0-beta.9.

🛡️ Contournement

Contournement : 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.

🔍 Détection

Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.

Actions de réponse

Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre

  1. 1
    Identify exposure identify
    Audit SBOM/dependencies for affected components.

    資産台帳・SBOM・依存マニフェストで com.datadoghq:datadog-api-client を使っているサービスとバージョンを洗い出す。

  2. 2
    Apply temporary workaround mitigate
    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`.

    パッチが適用されるまでの応急処置として、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. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade com.datadoghq:datadog-api-client to 1.0.0-beta.9

    ステージング環境で 1.0.0-beta.9 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Paquets affectés

Maven com.datadoghq:datadog-api-client
[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0-beta.6"},{"fixed":"1.0.0-beta.9"}]}]

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus