Epidemic attack is a severe security problem in network-coding-enabled wireless mesh networks (WMNs). Malicious nodes can easily launch such form of attack to create an epidemic spreading of polluted packets and deplete network resources. The contribution of this work is to address such security problem. We allow the presence of "smartâ attackers, i.e., they can pretend to be legitimate nodes to probabilistically transmit valid packets so as to reduce the chance of being detected. We also address the case where attackers cooperatively inject polluted packets. We employ the time-based checksum and batch verification to determine the existence of polluted packets, then propose a set of fully "distributedâ and "randomizedâ detection algorithms so that each legitimate node in a WMN can identify its malicious neighbors and purge them for future communication. We provide formal analysis to quantify the performance of the algorithms. Furthermore, simulation and system prototyping are carried out to validate the theoretic analysis and show the effectiveness and efficiency of the detection algorithms.