CloudSEK’s BeVigil platform recently identified a critical security lapse on a publicly accessible of an aviation giant. The vulnerability stemmed from an exposed JavaScript file that contained an unauthenticated API endpoint. This endpoint granted access tokens to Microsoft Graph with elevated privileges, ultimately leading to unauthorized exposure of sensitive data belonging to more than 50,000 Azure AD users.

What Went Wrong
BeVigil’s API Scanner found that a JavaScript bundle with subdomain included on a hardcoded endpoint that was being accessed without authentication. This endpoint issued a Microsoft Graph API token with excessive permissions, specifically User.Read.All and AccessReview.Read.All. These permissions are typically restricted due to their ability to access full user profiles and critical identity governance data.
Using this token, an attacker could query Microsoft Graph endpoints to retrieve detailed employee information, including names, job titles, contact details, reporting structures, and even access review configurations. Such exposure not only undermines user privacy but also opens the door to privilege escalation, identity theft, and targeted phishing campaigns, especially since executive-level data was also exposed.

Scale and Severity
The impact is far-reaching. Data associated with over 50,000 users was accessible, and the endpoint continued to return records for newly added users. Among the exposed information were personal identifiers, user principal names, access role assignments, and other governance details. The exposure of this magnitude significantly increases the organization’s attack surface and introduces compliance risks under frameworks such as GDPR and CCPA.
Security and Compliance Implications
- Unauthorized Data Access: Attackers could exploit the API to retrieve confidential employee records directly from Azure AD.

- Token Misuse: The leaked token could grant unrestricted visibility into internal directory structures and governance decisions.

- Executive Exposure: The data of senior leadership was accessible, making them high-value targets for impersonation or social engineering.
Open Screenshot 2025-05-30 at 12.33.26 PM.png

- Regulatory Violations: The exposure of personally identifiable information without proper safeguards raises serious compliance concerns. Data breaches erode user trust and can lead to long-term reputational harm and operational disruption.
Recommended Remediations
BeVigil suggested that following actions are implemented on priority:
- Disable Public API Access: Restrict the vulnerable endpoint and enforce strict authentication controls.
- Revoke Compromised Tokens: Invalidate exposed tokens and rotate affected credentials.
- Enforce Least Privilege: Review and limit token scopes to only what is necessary.
- Monitor API Usage: Implement logging and alerting to detect abnormal Microsoft Graph activity.
- Secure Front-End Code: Avoid embedding sensitive endpoints or token logic in client-side scripts.
- Review Permissions and Roles: Audit all Azure AD roles and access reviews to eliminate overprovisioned permissions.
- Implement Rate Limiting: Protect API endpoints with rate controls and anomaly detection.
Final Thoughts
This incident underscores the importance of securing front-end components and ensuring that sensitive backend services are never directly exposed. Organizations must proactively monitor their digital infrastructure and enforce strict access controls to protect user data and maintain regulatory compliance. Vigilance at every layer of the tech stack is not just best practice, it is essential for safeguarding trust in today’s interconnected world.