Assalamualaikum ustaz. What is the ruling of eating fruitworm? Thank you.
Waalaikumussalam wrt. wbt.,
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions, and all those who follow his footsteps until the Final day.
We begin with the statement of Allah SWT:
قُل لَّا أَجِدُ فِي مَا أُوحِيَ إِلَيَّ مُحَرَّمًا عَلَىٰ طَاعِمٍ يَطْعَمُهُ إِلَّا أَن يَكُونَ مَيْتَةً أَوْ دَمًا مَّسْفُوحًا أَوْ لَحْمَ خِنزِيرٍ فَإِنَّهُ رِجْسٌ أَوْ فِسْقًا أُهِلَّ لِغَيْرِ اللَّهِ بِهِ
“Say, “I do not find within that which was revealed to me [anything] forbidden to one who would eat it unless it is a dead animal or blood spilt out or the flesh of swine – for indeed, it is impure – or it is [that slaughtered in] disobedience, dedicated to other than Allah.” 
Likewise, in another statement of Allah SWT:
يَسْأَلُونَكَ مَاذَا أُحِلَّ لَهُمْ ۖ قُلْ أُحِلَّ لَكُمُ الطَّيِّبَاتُ
“They ask you, [O Muhammad], what has been made lawful for them. Say, “Lawful for you are [all] good foods,” 
The above verse shows that Allah ‘Azza wa Jalla generally permits us to eat all good food. Thus, anything that is good is permissible to be eaten, while all that is filthy and disgusting is prohibited to be eaten. The determination of whether it is good or disgusting food – if there isn’t any evidence regarding it – follows the natural consideration of the Arabs, for the Quran is revealed to them – that is in their language. 
Basically, in madhhab Syafi’I, the ruling of eating worms is prohibited except for worms found in cheese, vinegar, green pea, fruits and others that are from food, where the worm originates from the pure food. Imam al-Nawawi stated that there are three opinions of scholars in madhhab Syafi’e regarding the permissibility of worms and the first opinion states that it is permissible. The second opinion prohibits it. While the third opinion states that it is permissible to be eaten together with what it is in and not separately, for it is prohibited to eat it separately. 
Likewise, if the worm died in the food or thing it originates from. According to madhhab Syafi’I, ti is considered najis due to its demise. However, regarding the ruling on eating it, there are three opinions of scholars from madhhab Syafi’I, that is the first opinion is that it is permissible to eat it together with the food it originates from and not separately. The second opinion, eating it is permissible in absolution and the third opinion states that eating it is prohibited in absolution. Thus, the sahih opinion is that it is considered najis, but it isn’t harmful to those who eat it. Hence, there are exceptions in this matter, where it is permissible to eat it with the food it originates from. 
Furthermore, al-Khatib al-Syirbini also stated that according to the strong opinion in madhhab Syafi’I, it is permissible to eat worms that originate from vinegar, cheese, and fruits, only if it is eaten with them. The same applies to the ruling when it is dead – in the food – that is it is halal to be eaten according to the strong opinion. The reason is it is difficult to separate it. Some contemporary scholars compare meat with worms and fruits with worms. According to this ‘illah, then if one is able to separate the worm from the apple, then it is prohibited to eat it together. Ibn Syahbah said that this is the apparent opinion, that is it isn’t difficult to separate them.
Moreover, it isn’t included in the phrase “مَعَهُ” (eating the worm together with the food), for cases of eating the worm separately. The reason is it is prohibited due to the najis characteristic of its carcass and disgusting attribute. Likewise, – it is prohibited – if the worm is moved to another place as stated by al-Bulqini, or the worm moves away to another place and then returns to its nest (in the fruit) after we have taken care of the fruit from the worm as discussed by contemporary scholars. The second opinion stated that it is halal in absolution, for the worm is considered a part of the fruit. While the third opinion stated that it is prohibited in absolution, for it is considered a carcass. 
The permissibility of eating worms in fruits is based on the Islamic legal maxim:
“(The ruling for) something that follows is in accordance with (its original ruling).” 
In this case, worms found in fruits are considered (تابع) which means it follows while the ruling of the fruit or food is the (أصل) that is the original ruling. Hence, food worm is halal to be eaten with the food it originates from, for it follows the original ruling of food, which is halal.
Furthermore, the permissibility of eating food worms is Tab’an (following the original ruling) and not its original ruling. Thus, it is impermissible to eat the worm separately from the food it originates from.
Moreover, scholars of madhhab Syafi’I and Hanbali are of the opinion that it is halal to eat a worm that originates from vinegar and fruits on three conditions:
- The worm must be eaten together with the food it originates from regardless of whether it is alive or dead. If it is eaten separately from the food it originates from, then it is prohibited.
- The worm isn’t moved to another place – that is it is separated. If it is moved to another place, then it is impermissible to eat it.
- The worm doesn’t clearly affect and change the taste, smell and color of the food if the food is in liquid form. If it changes one of the matters, then it is impermissible to eat or drink it due to its najis attribute. 
Encouragement to first check old fruits
There is a hadith related to the manners of first checking dates from worms and pests. This is as narrated by Anas bin Malik RA, he said:
أُتِىَ النَّبِىُّ ﷺ بِتَمْرٍ عَتِيقٍ فَجَعَلَ يُفَتِّشُهُ يُخْرِجُ السُّوسَ مِنْهُ
“The Prophet was brought some old dates he began to examine them and remove the worms from them.” 
Al-Munawi stated that the prophet PBUH ate the dates after removing worms and other pests that aren’t prohibited from eating them. Scholars in madhhab Syafi’I rule eating fruit worms together with the fruit because it is difficult to separate them. 
Furthermore, Ibn Ruslan in his commentary stated that scholars from madhhab Syafi’I are of the opinion, worms that originate from fruits, cheese, vinegar, green pea, grain and others, if they die in the food it originates from, then it is najis according to the strong opinion in the madhhab. As for the ruling of eating it. According to the sahih opinion, it is considered najis but there is no harm in eating it. It is halal to eat it together with the food it originates from because it is difficult to control or prevent. However, it is best if the person removes the worm from the food, regardless of whether the worm is alive or dead as stated in the above hadith. 
Moreover, al-‘Azim Abadi also said that this hadith shows that it is makruh to eat anything that one assumes to contain a worm without first checking it. Furthermore, it is stated by the author of Fath al-Wadud, in the hadith, there is a lesson where food that isn’t najis when there is a worm inside it isn’t prohibited to be eaten. Likewise, al-Qari said, al-Tabarani narrated with a good sanad from Ibn Umar through marfu’ where the Prophet PBUH restricts inspecting the insides of dates. Thus, the restriction can be understood, where it may be possible that it is addressed for new dates to avoid doubt or there is a possibility that the Prophet PBUH’s act is to explain the permissibility of eating it and the restriction can be understood as makruh tanzih. 
According to the above discussion and arguments, in our opinion, it is fine if one accidentally eats a fruit worm on the condition that it is eaten together with the fruits. The permissibility of eating it is because it is difficult to separate them when it isn’t harmful to the person who eats it. Thus, an exception is given in this matter. As for separating it from the fruit or eating it by itself, then it is prohibited, for it is included in a type of insect that is disgusting to be eaten.
May Allah SWT grant us all a clear understanding in religion. Amin.
 Surah al-An‘am: 145
 Surah Ma’idah: 4
 See Majmu‘ Syarh al-Muhazzab, 9/15.
 See Majmu‘ Syarh al-Muhazzab, 9/36-37.
 See Mughni al-Muhtaj, 6/99.
 See al-Asybah wa al-Naza’ir by al-Suyuti, 1/117.
 See Mausu‘ah al-Fiqhiyyah al-Kuwaitiyyah, 5/143.
 Riwayat Abu Daud (3832)
 See al-Taisir, 2/267.
 See Syarah Sunan Abi Daud, 15/487.
 See ‘Aun al-Ma‘bud, 10/220.