Vulnerabilities in pkg:npm/@azure/identity

PACKAGE
Advisory Identifier: GHSA-m5vv-6r4h-3vj9
Advisory Summary

CVE-2024-35255 is a MODERATE (CVSS 5.5) azure identity libraries and microsoft vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Azure identity libraries in the PyPI ecosystem. The issue involves azure identity libraries and microsoft authentication library elevation of privilege vulnerability. Remediation is available by upgrading affected packages to version 1.16.1, 4.2.1, 1.12.2, 2.9.2, 4.60.4, 1.6.0-beta.4.0.20240610221955-50774cd97099, 1.15.1, 1.11.4, 4.61.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@azure/identity

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@azure/identity. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m5vv-6r4h-3vj9 CVE-2024-35255 MODERATE Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability

CVE-2024-35255 at a Glance

CVE Identifier CVE-2024-35255
GHSA Identifier GHSA-m5vv-6r4h-3vj9
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Affected Product Azure identity
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-35255

To remediate this vulnerability, upgrade all affected Azure identity dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

azure-identity fixed: 1.16.1
pip install azure-identity>=1.16.1
@azure/identity fixed: 4.2.1
npm install @azure/identity@4.2.1
com.azure:azure-identity fixed: 1.12.2
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-identity</artifactId>
    <version>1.12.2</version>
</dependency>
@azure/msal-node fixed: 2.9.2
npm install @azure/msal-node@2.9.2
Microsoft.Identity.Client fixed: 4.60.4
Upgrade Microsoft.Identity.Client to 4.60.4
github.com/Azure/azure-sdk-for-go/sdk/azidentity fixed: 1.6.0-beta.4.0.20240610221955-50774cd97099
Upgrade github.com/Azure/azure-sdk-for-go/sdk/azidentity to 1.6.0-beta.4.0.20240610221955-50774cd97099
com.microsoft.azure:msal4j fixed: 1.15.1
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>msal4j</artifactId>
    <version>1.15.1</version>
</dependency>
Azure.Identity fixed: 1.11.4
Upgrade Azure.Identity to 1.11.4
Microsoft.Identity.Client fixed: 4.61.3
Upgrade Microsoft.Identity.Client to 4.61.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show azure-identity

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-35255, inspect your installed packages using pip:

pip show azure-identity

Analyze the terminal output to locate any version of Azure identity in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.16.1), your application is affected.

Note: The pip show azure-identity command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Azure identity, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability.

CVE-2024-35255 Affected Azure identity Versions

9 component(s)
Fixed Versions:
1.16.14.2.11.12.22.9.24.60.41.6.0-beta.4.0.20240610221955-50774cd970991.15.11.11.44.61.3
Product / Package Ecosystem Affected Versions Fixed Version
azure-identity
PyPI
< 1.16.1
1.16.1
@azure/identity
npm
< 4.2.1
4.2.1
com.azure:azure-identity
Maven
< 1.12.2
1.12.2
@azure/msal-node
npm
≥ 2.7.0
< 2.9.2
2.9.2
Microsoft.Identity.Client
NuGet
≥ 4.49.1
< 4.60.4
4.60.4
github.com/Azure/azure-sdk-for-go/sdk/azidentity
Go
< 1.6.0-beta.4.0.20240610221955-50774cd97099
1.6.0-beta.4.0.20240610221955-50774cd97099
com.microsoft.azure:msal4j
Maven
≥ 1.14.4-beta
< 1.15.1
1.15.1
Azure.Identity
NuGet
< 1.11.4
1.11.4
Microsoft.Identity.Client
NuGet
≥ 4.61.0
< 4.61.3
4.61.3

References

Frequently Asked Questions

What is CVE-2024-35255?
CVE-2024-35255 is a security vulnerability in Azure identity involving Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition').
Which Azure identity versions are affected?
Affected versions include releases prior to 1.16.1, 4.2.1, 1.12.2, 2.9.2, 4.60.4, 1.6.0-beta.4.0.20240610221955-50774cd97099, 1.15.1, 1.11.4, 4.61.3 across affected packages: azure-identity, @azure/identity, com.azure:azure-identity, @azure/msal-node, Microsoft.Identity.Client, github.com/Azure/azure-sdk-for-go/sdk/azidentity, com.microsoft.azure:msal4j, Azure.Identity.
What version fixes CVE-2024-35255?
Upgrading to 1.16.1, 4.2.1, 1.12.2, 2.9.2, 4.60.4, 1.6.0-beta.4.0.20240610221955-50774cd97099, 1.15.1, 1.11.4, 4.61.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is azure-identity affected?
Yes, azure-identity is affected in releases prior to 1.16.1, 1.12.2. Upgrade your dependency to 1.16.1, 1.12.2 or later.
Is @azure/identity affected?
Yes, @azure/identity is affected in releases prior to 4.2.1. Upgrade your dependency to 4.2.1 or later.
What is the CVSS score of CVE-2024-35255?
CVE-2024-35255 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-35255?
CVE-2024-35255 is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') (The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.).
How can I check PyPI dependencies for CVE-2024-35255?
Run the dependency tree command: 'pip show azure-identity'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m5vv-6r4h-3vj9",
  "modified" : "2025-07-22T14:51:01Z",
  "published" : "2024-06-11T18:30:50Z",
  "aliases" : [ "CVE-2024-35255" ],
  "summary" : "Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability",
  "details" : "Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "azure-identity"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.16.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@azure/identity"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.azure:azure-identity"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.12.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@azure/msal-node"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.9.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.Identity.Client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.49.1"
      }, {
        "fixed" : "4.60.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.0-beta.4.0.20240610221955-50774cd97099"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.microsoft.azure:msal4j"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.14.4-beta"
      }, {
        "fixed" : "1.15.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Azure.Identity"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.Identity.Client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.61.0"
      }, {
        "fixed" : "4.61.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-35255"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4806#issuecomment-2178960340"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Azure/azure-sdk-for-go/commit/50774cd9709905523136fb05e8c85a50e8984499"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Azure/azure-sdk-for-java/commit/5bf020d6ea056de40e2738e3647a4e06f902c18d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Azure/azure-sdk-for-js/commit/c6aa75d312ae463e744163cedfd8fc480cc8d492"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Azure/azure-sdk-for-net/commit/9279a4f38bf69b457cfb9b354f210e0a540a5c53"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Azure/azure-sdk-for-python/commit/cb065acd7d0f957327dc4f02d1646d4e51a94178"
  }, {
    "type" : "WEB",
    "url" : "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-35255"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-362" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-11T19:57:01Z",
    "nvd_published_at" : "2024-06-11T17:16:03Z"
  }
}