Local File Disclosure in VLC media player iOS app

Project Description

A local file disclosure was found in the ‘Sharing over WiFi’ feature of the VLC media player iOS app. This feature is vulnerable because of insufficient input validation and arbitrary local files can be disclosed. Files that include passwords and other sensitive information can be accessed with current application privileges.


Vendor description

“VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols.”

Source: https://itunes.apple.com/us/app/vlc-for-mobile/id650377962?mt=8

Business recommendation

The identified vulnerability allows attackers to steal arbitrary files (accessible by the app) from the mobile device.

SEC Consult recommends not to enable “Sharing over WiFi” feature in VLC for iOS which allows wireless file transfer to/from PC until a thorough security review has been performed by security professionals and all identified issues have been resolved.

Vulnerability overview/description

1) Local file disclosure

The ‘Sharing over WiFi’ feature in VLC for iOS is vulnerable to a local file disclosure vulnerability. An attacker can read any files which can be accessed with current application privileges. This issue can lead to data theft.

Proof of concept

1) Local file disclosure

The example below shows how the LFD vulnerability can be exploited.

 URL : http://$IP:$PORT/download/<path-to-file-or-folder>
 METHOD : GET
 EXAMPLE : http://$IP:$PORT/download//etc/passwd

The source code excerpt below shows the vulnerable code of the mobile app:

 VULN. FILE : Sources/VLCHTTPConnection.m
 VULN. CODE :
 [...]
 - (NSObject<HTTPResponse> *)_httpGETDownloadForPath:(NSString *)path
 {
 NSString *filePath = [[path stringByReplacingOccurrencesOfString:@"/download/" withString:@""]stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
 HTTPFileResponse *fileResponse = [[HTTPFileResponse alloc] initWithFilePath:filePath forConnection:self];
 fileResponse.contentType = @"application/octet-stream";
 return fileResponse;
 }
 [...]

Vulnerable / tested versions

VLC version 2.7.8 has been tested on iOS 10.3.3 and found to be vulnerable.

Vendor contact timeline

2017-08-23: Contacting vendor through email
2017-08-23: Vendor replied, they are looking at it
2017-09-05: Asked for a status update from the vendor
2017-09-09: Vendor released patch in version 2.8.1
2017-09-13: Public release of advisory

Solution

Upgrade to the latest version available:
https://itunes.apple.com/us/app/vlc-for-mobile/id650377962?mt=8

Workaround

Disable the ‘Sharing over WiFi’ feature.

Advisory URL

https://www.sec-consult.com/en/vulnerability-lab/advisories/index.html

 

EOF Ahmad Ramadhan / @2017

Project Details

  • TitleLocal File Disclosure
  • ProductVLC media player iOS app
  • Vulnerable version2.7.8
  • Fixed version2.8.1
  • CVE number-
  • ImpactMedium
  • Homepagehttps://itunes.apple.com/us/app/vlc-for-mobile/id650377962?mt=8
  • Found2017-08-22
  • ByAhmad Ramadhan Amizudin (Office Malaysia) | SEC Consult Vulnerability Lab

Cookie Preference

Please select an option. You can find more information about the consequences of your choice at Help.

Select an option to continue

Your selection was saved!

Help

Help

To continue, you must make a cookie selection. Below is an explanation of the different options and their meaning.

  • Accept all cookies:
    All cookies such as tracking and analytics cookies.
  • Accept first-party cookies only:
    Only cookies from this website.
  • Reject all tracking cookies:
    No cookies except for those necessary for technical reasons are set.

You can change your cookie setting here anytime: Privacy Statement. Legal Notice

Back