Due to their open architecture, collaborative filtering recommender systems are susceptible to recommendation attacks, in which attackers inject fake rating data into the system to affect the accuracy of recommendation results. To detect these attacks, numerous detection methods have been designed and proven effective. However, in recent years, deep learning-based recommendation attack models such as GSA-GAN have shown higher concealment, posing new challenges to existing detection methods. Motivated by the need for improved detection, in this paper we propose a new approach called CNN-BAG, which integrates convolutional neural network (CNN) and Bagging (BAG) techniques. CNN-BAG can enhance the detection performance by simultaneously leveraging the deep learning capabilities of CNN and the ensemble learning strengths of Bagging. Firstly, we construct a deep neural network based on CNN as the base learner to automatically extract and learn features of recommendation attacks. Secondly, we use the Bagging algorithm to perform bootstrap sampling on the training data to generate multiple diverse training subsets. The above constructed base learners are then trained on these generated training subsets to produce multiple base classifiers for classifying recommendation attacks. Finally, we combine the base classifiers’ outputs using a majority voting method to obtain the final detection results. To assess the performance of CNN-BAG in detecting recommendation attacks, we compared it against several well-established detection methods on the Movielens-10M and Amazon datasets. Our experiments revealed that CNN-BAG is adept at identifying various attack types, including the deep learning-based recommendation attack models.