Miggo Logo

CVE-2024-35255:
Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability

5.5

CVSS Score
3.1

Basic Information

EPSS Score
0.34573%
Published
6/11/2024
Updated
8/7/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
azure-identitypip< 1.16.11.16.1
@azure/identitynpm< 4.2.14.2.1
com.azure:azure-identitymaven< 1.12.21.12.2
github.com/Azure/azure-sdk-for-go/sdk/azidentitygo< 1.6.01.6.0
Azure.Identitynuget< 1.11.41.11.4
@azure/msal-nodenpm>= 2.7.0, < 2.9.22.9.2
com.microsoft.azure:msal4jmaven>= 1.14.4-beta, < 1.15.11.15.1
Microsoft.Identity.Clientnuget>= 4.49.1, < 4.60.44.60.4
Microsoft.Identity.Clientnuget>= 4.61.0, < 4.61.34.61.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability exists in multiple Azure SDKs across different languages (Go, JS, Python, Java, .NET) within their Azure Arc Managed Identity authentication components. Specifically, when these components communicate with the Hybrid Instance Metadata Service (HIMDS), they receive a 'WWW-Authenticate' header that contains a file path to a secret key. Before the patches, the SDKs would use this file path to read the key without sufficient validation(). An attacker who could control the HIMDS response (e.g., in a compromised environment or through DNS spoofing if applicable to the HIMDS communication) could provide an arbitrary file path. This would cause the SDK to attempt to read that arbitrary file from the local system where the application using the SDK is running. The patches introduce strict validation for this file path, ensuring it resides within an expected, OS-specific directory (e.g., '/var/opt/azcmagent/tokens' on Linux, '%ProgramData%\AzureConnectedMachineAgent\Tokens' on Windows), has a '.key' extension, and does not exceed a size of 4096 bytes. The identified vulnerable functions are those directly responsible for parsing this header, constructing the file path, and reading the file, or the higher-level functions that orchestrate this process() and were modified to include the new validation logic. The core issue is the trust placed in the file path provided by HIMDS without adequate sanitization or restriction, leading to a potential arbitrary file read vulnerability.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*zur* I**ntity Li*r*ri*s *n* Mi*roso*t *ut**nti**tion Li*r*ry *l*v*tion o* Privil*** Vuln*r**ility.

Reasoning

T** vuln*r**ility *xists in multipl* *zur* S*Ks **ross *i***r*nt l*n*u***s (*o, JS, Pyt*on, J*v*, .N*T) wit*in t**ir *zur* *r* M*n**** I**ntity *ut**nti**tion *ompon*nts. Sp**i*i**lly, w**n t**s* *ompon*nts *ommuni**t* wit* t** *y*ri* Inst*n** M*t***