Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6074] File unsafe Delete Check - Android

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionHold
Resolution Date2018-12-30T22:00:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMuhammad Sabir
AssigneeShak Hossain
Created2018-12-19T15:06:43.000+0000
Updated2018-12-30T22:00:07.000+0000

Description

Hello, I'm working on an application and when I had a vulnerability test against this application I got a vulnerability that says, *When you delete a file using file.delete(), only the reference to the file is removed from the file system table. The file still exists on disk until other data overwrites it, leaving it vulnerable to recovery.* This app uses file.delete() in following methods, 1.org.appcelerator.kroll.util.TiTempFileHelper.doCleanTempDir() 2.org.appcelerator.titanium.util.TiFileHelper.wipeDirectoryTree() 3.org.appcelerator.titanium.util.TiFileHelper.destroyTempFiles() 4.ti.modules.titanium.media.MediaModule.launchNativeCamera() 5.org.appcelerator.titanium.io.TiFile.deleteTree() 6.org.appcelerator.titanium.io.TiFile.deleteDirectory() 7.org.appcelerator.titanium.io.TiFile.deleteFile() 8.org.appcelerator.titanium.util.TiResponseCache$TiCacheCleanup.run() 9.org.appcelerator.titanium.util.TiResponseCache$TiCacheRequest.abort() 10.ti.modules.titanium.media.MediaModule$CameraResultHandler.checkAndDeleteDuplicate( ) 11.ti.modules.titanium.media.MediaModule$CameraResultHandler.onError() 12.ti.modules.titanium.media.MediaModule$CameraResultHandler.onResult() 13.ti.modules.titanium.network.TiHTTPClient.deleteTmpFiles() My question is, how can I cater this issue? This is a serious vulnerability and a threat to application's security. Please have a look and provide your feedback. Thank you.

Comments

  1. Rakhi Mitro 2018-12-20

    Hello, Thanks for reporting this. We need more information here. It would be better to investigate if you can send us the steps to reproduce this on our end.
  2. Muhammad Sabir 2018-12-21

    Hello Rakhi Mitro, Thank you for your swift reply. Actually we've not use *file.delete()* in our code. After completing the development and QA cycle we had a vulnerability test on our application by a third party tool *QUIXXI Solutions*. They find out this vulnerability that I have mentioned in description. We're not using this method in our code but it is still coming due to the builtin libraries that are using this method i.e. *file.delete*. I believe if we run a vulnerability test on a default application created by Appcelerator, this vulnerability would appear as Appcelerator is using these builtin libraries to compile applications. My question is, how can we get rid of this vulnerability? Looking forward to hear back from you. Thank you.
  3. Sharif AbuDarda 2018-12-22

    Hello, This should not cause any issue in the app performance or security. Also, the app store or play store does not recognize this as a security threat. This issue was detected by a third party tool, a native report of the issue would have been more concerning. We will keep this open, Our engineers might be interested to look into it. Thanks.

JSON Source