A significant security flaw has been identified in Microsoft’s OneDrive File Picker, potentially exposing millions of users to unauthorized data access. This vulnerability allows third-party web applications to gain complete access to a user’s entire OneDrive storage, rather than just the specific files intended for sharing.
Discovery and Scope of the Vulnerability
On May 28, 2025, security researchers from Oasis Security reported that the OneDrive File Picker’s implementation suffers from overly broad OAuth scopes and misleading consent screens. These issues fail to clearly communicate the extent of access being granted to third-party applications. The flaw affects numerous widely used web applications, including ChatGPT, Slack, Trello, and ClickUp, thereby putting millions of users at risk.
Technical Details of the Flaw
The core of the vulnerability lies in the OneDrive File Picker’s use of insufficient OAuth scope granularity. When users intend to upload or share a single file, the picker requests broad permissions such as File Access.Read.All or Files.ReadWrite.All. This approach grants unrestricted access to all of a user’s OneDrive content, rather than limiting access to the specific files selected.
In contrast, competitors like Google Drive offer more refined OAuth scopes, such as drive.file, which restrict access to app-created or user-selected files. Dropbox employs an even more secure method with its Chooser SDK, using a proprietary endpoint that avoids OAuth flows entirely.
The consent dialog presented to users exacerbates the issue by not clearly conveying that granting access allows the integrator to access every file and folder in the user’s OneDrive, not just the document intended for sharing.
Insecure Token Storage Practices
The security risks are further compounded by insecure token storage practices across different versions of the OneDrive File Picker. Older versions (6.0-7.2) utilized implicit authentication flows that exposed sensitive access tokens in URL fragments or stored them insecurely in browser localStorage. The latest version (8.0) requires developers to handle authentication using the Microsoft Authentication Library (MSAL), but still stores tokens in session storage in plain text.
MSAL’s Authorization Flow implementation introduces additional vulnerabilities by potentially issuing Refresh Tokens that extend access periods beyond the typical one-hour token expiration. When these long-lived tokens are cached in localStorage or backend databases without encryption, they create persistent attack vectors for malicious actors to access entire OneDrive repositories.
Microsoft’s Response and Recommendations
Microsoft has acknowledged the security report and indicated that it may consider improvements in the future, though no specific timeline has been provided.
In the interim, security experts recommend immediate actions for both users and organizations to mitigate risks:
– For Individual Users: Review third-party app access through Microsoft Account privacy settings and revoke unnecessary permissions.
– For Organizations: Implement admin consent policies or conditional-access controls that block applications requesting anything beyond Files.Read permissions.
– For Web Application Developers: Avoid requesting offline access scopes that generate Refresh Tokens and implement secure token storage practices.
Additionally, security teams should monitor Graph API and Cloud Access Security Broker (CASB) logs for anomalous OneDrive access patterns.
Broader Implications and Related Vulnerabilities
This vulnerability is part of a series of security concerns associated with Microsoft’s OneDrive and related services:
– CVE-2020-1465: An elevation of privilege vulnerability in Microsoft OneDrive allowed attackers to delete files in arbitrary locations, potentially leading to unauthorized data access and system compromise. ([feedly.com](https://feedly.com/cve/CVE-2020-1465?utm_source=openai))
– Cryptojacking Campaigns: In 2022, a cryptojacking campaign exploited a OneDrive vulnerability to gain persistence and run undetected on infected devices, highlighting the platform’s appeal to malicious actors. ([csoonline.com](https://www.csoonline.com/article/573877/new-cryptojacking-campaign-exploits-onedrive-vulnerability.html?utm_source=openai))
– ‘DoubleDrive’ Attack: In 2023, researchers demonstrated how Microsoft’s OneDrive could be turned into ransomware, encrypting most files on a target machine without the possibility of recovery. ([scmagazine.com](https://www.scmagazine.com/news/doubledrive-attack-turns-microsoft-onedrive-into-ransomware?utm_source=openai))
– Phishing Campaigns: Sophisticated phishing campaigns have targeted Microsoft OneDrive users, employing advanced social engineering tactics to trick users into executing malicious scripts, compromising their systems. ([infosecurity-magazine.com](https://www.infosecurity-magazine.com/news/phishing-campaign-targets/?utm_source=openai))
Conclusion
The discovery of this critical vulnerability in Microsoft’s OneDrive File Picker underscores the importance of robust security practices and vigilant oversight when integrating third-party applications with cloud storage services. Users and organizations must proactively manage permissions, implement stringent access controls, and stay informed about potential security risks to safeguard sensitive data.