A fly in the ointment
A small but irritating flaw that spoils the whole.
These days ointments are chiefly for medicinal use - just the thing for rubbing on that nasty rash. In earlier times, ointments were more likely to be creams or oils with a cosmetic or ceremonial use. Literally, ointment was the substance one was annointed with. There is considerable annointing in Bible stories and it isn't surprising therefore that this phrase has a biblical origin. Ecclesiastes 10:1 (King James Version) has:
"Dead flies cause the ointment of the apothecary to send forth a stinking savour: so doth a little folly him that is in reputation for wisdom and honour."
Our contempary phrase 'the fly in the ointment' didn't appear until later. The earliest example I have found in print of that precise wording is in John Norris' A Practical Treatise Concerning Humility, 1707:
'Tis that dead fly in the ointment of the Apothecary.