This is the primary Gemara passage on tevilat keilim, including the derivation from the verse about spoils of Midian and the mechanics of the mitzvah. It is the central source for the de'oraita/derabanan discussion.
גְּמָ׳ תָּנָא: וְכוּלָּן צְרִיכִין טְבִילָה בְּאַרְבָּעִים סְאָה. מְנָהָנֵי מִילֵּי? אָמַר רָבָא, דְּאָמַר קְרָא: ״כׇּל דָּבָר אֲשֶׁר יָבֹא בָאֵשׁ תַּעֲבִירוּ בָאֵשׁ וְטָהֵר״, הוֹסִיף לְךָ הַכָּתוּב טׇהֳרָה אַחֶרֶת. תָּנֵי בַּר קַפָּרָא: מִתּוֹךְ שֶׁנֶּאֱמַר ״בְּמֵי נִדָּה״, שׁוֹמֵעַ אֲנִי שֶׁצָּרִיךְ הַזָּאָה שְׁלִישִׁי וּשְׁבִיעִי, תַּלְמוּד לוֹמַר ״אַךְ״ — חָלַק.
GEMARA: The Sages taught: And they all require immersion in forty se’a of water, including utensils that must first be purged in boiling water or heated until white-hot. The Gemara asks: From where is this matter derived? Rava says: It is derived from that which the verse states with regard to utensils captured in the battle against the Midianites: “Anything that may tolerate the fire, you shall make to go through the fire, and it shall be pure” (Numbers 31:23). By stating: “And it shall be pure,” the verse added to the process another required act of purification in addition to heating the utensil with fire, which is understood to be immersion. Bar Kappara teaches an additional source for this halakha: From that which is stated in the continuation of the verse: “Nevertheless it shall be purified with the water of sprinkling [nidda],” I would derive that the utensils require sprinkling of purification water on the third and the seventh day of their purification process, as is the halakha in the case of one who is impure with impurity imparted by a corpse. Therefore, the verse states “nevertheless,” indicating that the Torah makes a distinction in this case, and that sprinkling on the third and seventh day are not required.