Coinfections and resistant bacterial infections are more likely to occur in cystic fibrosis patients because their immune systems are weak. The purpose of this study was to identify by molecular means as well as the formation of biofilm of aerobic and anaerobic coinfection bacteria isolated from cystic fibrosis patients in southwest Iran from 2014 to 2022. In this investigation, 130 clinical specimens were collected from 130 CF patients by universal primer. Biofilm formation was investigated using the microtiter plate method. Antibiotic resistance was measured using Vitec 2 device. In addition, identification of methicillin-resistant Staphylococcus aureus using genes mecA was performed. In aerobic bacteria, Pseudomonas aeruginosa was detected in (32%) of samples. In anaerobic bacteria (16%) Prevotella spp. was the most frequently isolated anaerobe bacteria found in of the CF patients. In this study, 75% of the bacteria could form biofilms, while 23% were unable to biofilm formation. In conclusion, P. aeruginosa was found to be the most frequently isolated bacterium from patients with CF, and many of these bacteria could form biofilms. Additionally, the high prevalence of antibiotic resistance indicates the urgent need for increased attention to antibiotic preparation and patient screening concerning bacterial coinfections and the virulence and adhesion factors of these bacteria. Furthermore, the present study demonstrates that the coinfection of bacteria with high antibiotic resistance and a high capacity for biofilm formation can pose a life-threatening risk to CF patients, mainly due to their weakened immune systems.