In the cooperative spectrum sensing, the bad channel environment where there are a few of malicious nodes, often results in deterioration of detection performance. This paper focuses on the spectrum sensing in the case malicious nodes and proposes an accumulated credibility-based weighted cooperative spectrum sensing algorithm. In the algorithm, the global fusion center weights the local detection result of each detection node according to its accumulated credibility. The higher the reliability of the node is, the larger the weight of the node is. It minimizes the harmful effects of accidental local detection errors. The simulation results show that the proposed algorithm can avoid the interference of malicious nodes and improve the spectrum sensing performance effective.