Put a Cork In It
It's not just cheap, supermarket wine that tastes vinegary. Expensive, aged bottles of wine can spoil and end up tasting like kitchen-shelf vinegar. Here's why:
Any wine can turn to vinegar if oxygen gets inside the bottle and reacts with the alcohol. This happens when a cork is defective, of poor quality, or when wine is stored upright instead of on its side. The storage position is crucial because to keep out oxygen, a cork must remain wet. If you buy old wine at your local liquor store, you can make a good guess as to the wine's condition based on what you see.
But wine-gone-to vinegar isn't a chance you have to take. Not since a couple of chemists designed a way to place an unopened bottle of wine into a nuclear magnetic resonance spectrometer. Normally this device is used to determine the chemical contents of a small tube of liquid, as well as to examine nuclei in the human body, but they have adapted the instrument so it can detect vinegar even before it reaches the official level required to call a wine spoiled.
"Wine Tasting: Instrument Can Sniff Out Vinegar In Sealed Wine" (ScienceNews)