CamScanner was actually a legitimate app, with no malicious intensions whatsoever, for quite some time.
It used ads for monetization and even allowed in-app purchases.
It can be assumed that the malware was added due to the app developers partnership with an unscrupulous advertiser.
It looks like app developers got rid of the malicious code with the latest update of CamScanner.
source: www.techworm.net