We are used to reading that "moth and rust" destroy earthly treasures, but some translations have "vermin" or a "devouring insect" (NET). BDAG says the reading "rust" "finds no support." Apparently, "rust" made its way into English through Tyndale and was made popular by the KJV.

The footnote in the NET is especially helpful.

"Traditionally “rust,” literally “eating” or “consuming.” Greek has a specific word for “rust” (James 5:3), whereas the term used here is not used of rust anywhere else. In the present context where moths are mentioned, some interpreters see a reference to some other kind of consuming insect. Mal 3:11 LXX does appear to use the Greek term as a translation of the Hebrew term for some type of grasshopper. Two OT passages (Job 13:28; Hos 5:12) mention “moth” in parallel with “rot” or “wood rot”; the physician Galen used the Greek term in medical texts to refer to the decay of teeth (6.422; 12.879). It is thus possible to see the second term in Matt 6:19 as referring to some type of rot, decay, or corrosion rather than as a specific reference to damage by insects or other pests. However, a surviving fragment by the Greek poet Pindar (fragment 209; Oxford Text = 222) mentions the inability of moths or weevils to destroy gold: “Gold is the child of Zeus; neither moth nor weevil consumes it” (cf. BDAG 922 s.v. σής where the word for “weevil,” κίς, is mistranslated as “rust”). In light of this usage and the context it was decided to render the Greek term as “devouring insect.”