Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: That of those fruits which becomes intoxicating, like wine, is unlawful; and "good provision" [Surah al-Nahl: 67], such as vinegar, fruit preserves and nabidh, is lawful for the Muslims.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17401