Counterfeit medicines are a global threat to public health. These pharmaceuticals are not subjected to quality control and therefore their safety, quality and efficacy cannot be guaranteed. Today, the safety evaluation of counterfeit medicines is mainly based on the identification and quantification of the active substances present. However, the analysis of potential toxic secondary components, like residual solvents, becomes more important. Assessment of residual solvent content and chemometric analysis of fingerprints might be useful in the discrimination between genuine and counterfeit pharmaceuticals. Moreover, the fingerprint approach might also contribute in the evaluation of the health risks different types of counterfeit medicines pose. In this study a number of genuine and counterfeit Viagra(®) and Cialis(®) samples were analyzed for residual solvent content using headspace-GC-MS. The obtained chromatograms were used as fingerprints and analyzed using different chemometric techniques: Principal Component Analysis, Projection Pursuit, Classification and Regression Trees and Soft Independent Modelling of Class Analogy. It was tested whether these techniques can distinguish genuine pharmaceuticals from counterfeit ones and if distinct types of counterfeits could be differentiated based on health risks. This chemometric analysis showed that for both data sets PCA clearly discriminated between genuine and counterfeit drugs, and SIMCA generated the best predictive models. This technique not only resulted in a 100% correct classification rate for the discrimination between genuine and counterfeit medicines, the classification of the counterfeit samples was also superior compared to CART. This study shows that chemometric analysis of headspace-GC impurity fingerprints allows to distinguish between genuine and counterfeit medicines and to differentiate between groups of counterfeit products based on the public health risks they pose.