Cannabinoids, cannabis, and cannabis-based medicines (CBMs) are increasingly used to manage pain, with limited understanding of their efficacy and safety. We summarised efficacy and adverse events (AEs) of these types of drugs for treating pain using randomised controlled trials: in people of any age, with any type of pain, and for any treatment duration. Primary outcomes were 30% and 50% reduction in pain intensity, and AEs. We assessed risk of bias of included studies, and the overall quality of evidence using GRADE. Studies of <7 and >7 days treatment duration were analysed separately. We included 36 studies (7217 participants) delivering cannabinoids (8 studies), cannabis (6 studies), and CBM (22 studies); all had high and/or uncertain risk of bias. Evidence of benefit was found for cannabis <7 days (risk difference 0.33, 95% confidence interval 0.20-0.46; 2 trials, 231 patients, very low-quality evidence) and nabiximols >7 days (risk difference 0.06, 95% confidence interval 0.01-0.12; 6 trials, 1484 patients, very low-quality evidence). No other beneficial effects were found for other types of cannabinoids, cannabis, or CBM in our primary analyses; 81% of subgroup analyses were negative. Cannabis, nabiximols, and delta-9-tetrahydrocannabinol had more AEs than control. Studies in this field have unclear or high risk of bias, and outcomes had GRADE rating of low- or very low-quality evidence. We have little confidence in the estimates of effect. The evidence neither supports nor refutes claims of efficacy and safety for cannabinoids, cannabis, or CBM in the management of pain.