“You thought you were sharing one file. You may have shared everything.”
Cybersecurity researchers at Oasis Security have uncovered a serious vulnerability in Microsoft’s OneDrive File Picker. At first glance, it looks like a simple tool for uploading files. But under the surface, it’s granting third-party websites and apps far more access than users realise and exposing both individuals and businesses to significant security and compliance risks.
This flaw doesn’t just affect Microsoft. It touches major platforms like ChatGPT, Slack, Trello, and ClickUp, apps millions rely on daily. The culprit? Overly broad OAuth permissions, vague consent screens, and insecure token handling. Microsoft has acknowledged the issue but no fix is currently available.
Let’s unpack what this means, how it works, and what you can do about it.
The Flaw: When “Upload One File” Means “Access Everything”
The OneDrive File Picker is designed to make sharing files easy. But the problem is in how access is granted.
When a user agrees to upload a single file, the File Picker requests permission to read the entire contents of the user’s OneDrive. This happens because Microsoft doesn’t provide fine-grained OAuth scopes for OneDrive access – there’s no way to grant access to just one file.
Worse, the consent prompt shown to users doesn’t clearly explain that they’re granting such broad access. The result? Users unknowingly allow third-party apps to read all their stored data.
This isn’t just bad UI/UX – it’s a security loophole.
Why It Matters: Real-World Risks from a Vague Consent Box
This isn’t a theoretical flaw. Here’s why it poses a clear and present danger:
- Unintended Full Access
Apps only need to upload one file, but end up with access to all of them. That’s not just overreach — it’s a potential data breach waiting to happen. - Impossible to Tell Who’s Trustworthy
Because every app must request full access, users can’t differentiate between legitimate applications and those with malicious intent. - Non-Expiring Access via Refresh Tokens
Many apps use Microsoft’s authentication library (MSAL), which issues long-lived refresh tokens. These tokens allow apps to maintain access without ever asking the user again — even after logout. - Plaintext Token Storage in Browsers
Tokens are stored in the browser’s session storage in plaintext, making them vulnerable to theft if the browser is compromised.
Risk to Users and Businesses Alike
If exploited, this flaw could lead to:
- Data Leakage
Sensitive customer or internal data could be accessed or exfiltrated without detection. - Compliance Failures
This type of access could violate data protection standards like GDPR, HIPAA, and ISO 27001 — especially if access is granted without user understanding or secure handling. - Persistent Threat Access
With refresh tokens, attackers could maintain long-term access to OneDrive accounts even after the initial exploit goes unnoticed.
Mitigation: What You Can Do Now
Until Microsoft provides a more secure solution, organisations and individuals can take the following steps to limit their exposure.
For End Users
- Review Your App Permissions
Log into your Microsoft account → Privacy → App Access. Review apps and “Stop Sharing” where necessary. Note: Access Tokens expire in about an hour, but revoking access removes Refresh Tokens immediately.
For IT Administrators
- Audit Third-Party Integrations
In Microsoft Entra Admin Center, review all enterprise apps. Check permissions granted, the scopes requested, and which users authorised them. - Check for OneDrive File Picker Usage
Attempt to upload a file through the app interface. If the consent prompt requests access to all OneDrive files, it’s using the File Picker.
For Developers
- Avoid Refresh Tokens
Don’t request offline_access. If used previously, securely dispose of all stored refresh tokens. - Secure Access Tokens
Don’t store access tokens in browser session or local storage. Dispose of them when no longer needed. - Remove or Replace File Picker
If feasible, disable the OneDrive upload option. Use shareable view-only links instead for safer file handling.
Microsoft’s Response
Microsoft confirmed the flaw but stated that, since user consent is required, it does not meet their threshold for immediate remediation. They’ve acknowledged the need for improvements in a future release.
That leaves users and IT teams responsible for protecting their environments until those changes arrive.
“This discovery reinforces the importance of continuous vigilance in OAuth scope management, regular security assessments, and proactive monitoring to protect user data.” – Oasis Security
Don’t Wait for a Breach
The OneDrive File Picker flaw is a perfect storm: vague prompts, overly broad permissions, and insecure token storage. While Microsoft works on a fix, threat actors won’t wait, and neither should you.
Need help assessing the risk in your environment? Our cybersecurity experts can help you audit permissions for your business.