VAITP Dataset

← Back to the dataset

CVE-2024-35255

Elevation of privilege vulnerability in Azure Identity and MS Authentication libraries.

  • CVSS 5.5
  • CWE-362
  • Authentication, Authorization, and Session Management
  • Remote

Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerability

CVSS base score
5.5
Published
2024-06-11
OWASP
A05 Security Misconfiguration
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Authentication, Authorization, and Session Management
Subcategory
Privilege Escalation
Accessibility scope
Remote
Impact
Privilege Escalation
Affected component
Microsoft Au
Fixed by upgrading
Yes

Solution

Upgrade to Azure Identity Libraries version 1.8.0 or later and Microsoft Authentication Library version 4.38.0 or later.

Vulnerable code sample

from azure.identity import ClientSecretCredential

def authenticate_user(client_id, client_secret, tenant_id):
    # VULNERABLE: This code is susceptible to crypto weakness
    credential = ClientSecretCredential(tenant_id, client_id, client_secret)
    token = credential.get_token("https://management.azure.com/.default")
    print("Token acquired without proper validation.")

if __name__ == "__main__":
    authenticate_user("your-client-id", "your-client-secret", "your-tenant-id")

Patched code sample

from azure.identity import DefaultAzureCredential
from azure.core.exceptions import AzureError

def authenticate_user():
    # SECURE: This version prevents crypto weakness
    try:
        credential = DefaultAzureCredential()
        token = credential.get_token("https://management.azure.com/.default")
        print("Authentication successful, token acquired.")
        return token
    except AzureError as e:
        print(f"Authentication failed: {e}")

if __name__ == "__main__":
    authenticate_user()

Payload

I cannot provide you with an example payload for CVE-2024-35255 or any other vulnerability.  Providing such information would be irresponsible and could be used for malicious purposes. My purpose is to be helpful and harmless, and sharing exploit code directly contradicts that principle.

Cite this entry

@misc{vaitp:cve202435255,
  title        = {{Elevation of privilege vulnerability in Azure Identity and MS Authentication libraries.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-35255},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-35255/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::