Passive worms spread so quickly in P2P networks that they can cause significant damage and serious security problems. To mitigate worm spreading, we used two classes of trust models: file-based trust and peer-based trust models. Peer-based trust provides to a peer the global trust values of all the other peers using the peers history of uploads. File trust provides to a peer the trust level of its sought file thanks to a process of voting. An hybrid trust model is introduced where we hybridize file-based and peer-based trust models. In this hybrid trust model, a requester peer checks firstly on the safety of the sought file (file trust) and then choose the most reputed peer from the set of peers that own the file (peer-based trust) for the downloading. A detailed simulation analysis is performed to study the performance of these trust models in terms of fraction of infected peers and number of infected downloaded files. Our results show that peer-based trusts could be used to mitigate the spread of worms in P2P networks because they limit downloading from malicious peers; but they are not effective in reducing the download rate of infected files from normal peers. Furthermore, we find that hybrid trust is an adequate security solution for mitigation of worm spreading in P2P network. Moreover, with comparison of several examples of peer-based trusts, we show that if we hybridize any peer-based trust with file trust, we obtain that the hybrid model is more efficient than this peer-based trust.