Recently I have talked to a few people who have thought bottles were bad when they found stuff on top of the cork before opening the bottle.
The cover over the cork is called the capsule. It is typically metal foil or plastic. If it is metal foil and the bottle is properly stored in a humid environment, you can get some oxidation of the foil that sticks to the cork or the glass lip of the bottle.
In either case if the bottle is properly stored you can get discoloration or even mold on top of the cork. Believe it or not, there is nothing wrong with this. You don’t have a bad bottle. It is an indication the bottle was stored in proper humid conditions.
So just take a clean cloth or paper towel and clean the top of the bottle before removing the cork. Just to be on the safe side, wipe it down again after you pull the cork and your bottle will be just fine.