It is narrated from Hazrat Abu Saeed Khudri (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) forbade garlic and onion. We asked him, "Are these things forbidden?" He replied, "No, but the Prophet (peace and blessings be upon him) has prohibited them."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 11805
Hadith Gradingحکم دارالسلام:إسناده ضعيف لضعف بشر بن حرب الأزدي، وقد سلف نحوه بإسناد صحيح برقم: 11084