Résumé : Abstract The availability of cannabidiol (CBD) oil products has increased in recent years. No analytical controls are mandatory for these products leading to uncertainties about composition and quality. In this paper, a methodology was developed to identify the oil matrix and to estimate the CBD content in such samples, using mid‐infrared and near‐infrared spectroscopy. Different oils were selected based on the information labeled on products and were bought in food stores in order to create a sample set with a variety of matrices. These oils were spiked with CBD to obtain samples with CBD levels from 0% to 20%. The first part of the study was focused on the qualitative analysis of the oil matrix. A classification model, based on Soft Independent Modeling of Class Analogy, was build using the spiked oils to distinguish between the different oil matrices. For both spectroscopic techniques, the sensitivity, the specificity, the accuracy and the precision were equal to 100%. These models were applied to determine the oil matrix of seized samples. The second part of the study was focused on the quantitative estimation of CBD. After determination of CBD in seized samples using gas chromatography‐tandem mass spectrometry, partial least square regression (PLS‐R) models were built, one for each matrix in the sample set. Both techniques were able to classify unknown oily samples according to their matrix, and although only few samples were available to evaluate the PLS‐R models, the approach clearly showed promising results for the estimation of the CBD content in oil samples.