If it's truly vinegar, that is aceterobacter contamination. If it's just "sour", that could be a pedio or lactobacillus contamination.
If there is ANY headspace in a wine vessel, that can allow enough oxygen to allow an infection to take hold. In my area, fruitflies are the biggest carrier of aceterobacteri.
Broken Leg Brewery
Giving beer a leg to stand on since 2006