Abdullah bin Umar reported,

When the Messenger of Allah ﷺ camped at al-Hijr during the expedition of Tabuk, he commanded the people not to drink from its well nor draw water from it. They said, "We have already kneaded dough with it and drawn water from it." So he ordered them to throw away that dough and pour out that water.It is also reported from Sabra bin Mabad and Abu al-Shamus that the Prophet ﷺ ordered the food to be discarded. And Abu Dharr reported from the Prophet ﷺ, "Whoever kneaded dough with its water..."

Bukhari 3378

Sahih

حدثنا محمد بن مسكين أبو الحسن حدثنا يحيى بن حسان بن حيان أبو زكرياء حدثنا سليمان عن عبد الله بن دينار

عن ابن عمر رضي الله عنهما

أن رسول الله ﷺ لما نزل الحجر في غزوة تبوك أمرهم أن لا يشربوا من بئرها ولا يستقوا منها فقالوا قد عجنا منها واستقينا فأمرهم أن يطرحوا ذلك العجين ويهريقوا ذلك الماء ويروى عن سبرة بن معبد وأبي الشموس أن النبي ﷺ أمر بإلقاء الطعام وقال أبو ذر عن النبي ﷺ من اعتجن بمائه

البخاري 3378صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hadiths of the prophets
Chapter
Allah's saying, "And to Thamud We sent their brother Salih"
Numbering
Darussalam 3378
Bukhari 3378