(Numbers 14:1:) THEN THE WHOLE CONGREGATION RAISED <THEIR VOICE AND WEPT>... This is what Scripture says (in Proverbs 18:8): THE WORDS OF A MURMURER ARE LIKE WOUNDING BLOWS. The words with which they murmured against the Holy One, blessed be He, were what caused them affliction for generations. For had they not made themselves equal to the spies, they would not have been smitten along with them; rather, they made common cause with them, as it is said (in Deuteronomy 1:27): AND YOU MURMURED IN YOUR TENTS...
Why the Congregation's Murmuring Doomed a Generation
Midrash Tanchuma Buber, Sh'lach 20:1
ותשא כל העדה וגו' (שם יד א). זש"ה דברי נרגן כמתלהמים (משלי יח ח), דברים שרגנו אחר הקב"ה הם גרמו להם צרה לדורות, שאילו לא נשתוו למרגלים לא היו לוקין עמהם, אלא השלימו עמהם, שנאמר ותרגנו באהליכם וגו' (דברים א כז).