Abstract Nowadays, fungal contamination of medical Cannabis inflorescences during postharvest has become an increasingly frequent and worrisome problem for consumers and the industry in general. This is because some of these microorganisms can produce secondary metabolites, such as mycotoxins, which can be toxic to humans. To assess the risk posed by fungal contamination and evaluate the potential for fungal isolates to produce mycotoxins, samples of medicinal Cannabis were tested for the presence of mycotoxin-forming fungi. Inflorescences were isolated on PDA agar at 23 ± 2 °C for ten days, and the microorganisms were identified. The strain with morphological characteristics compatible with the genus Aspergillus spp. was selected as the fungus with the highest risk of forming hazardous mycotoxins. This isolate was characterized conventionally and by molecular identification using primers for the internal transcribed spacer region (ITS) of ribosomal DNA and different coding genes and was identified as Aspergillus westerdijkiae. To determine mycotoxin formation, the genome of A. westerdijkiae was sequenced using the Illumina Novaseq platform in South Korea. The antiSMASH tool was used to search for gene clusters associated with producing secondary metabolites, and genes related to toxins were manually curated. Regions where the cluster of genes directly involved in OTA biosynthesis (otaA, otaB, otaC, otaR and otaD) were found, suggesting a potential risk of synthesis of this toxin.