Hoarding is haraam, as is indicated by the report narrated by Muslim in his Saheeh from ‘Amr ibn ‘Abd-Allaah (may Allaah be pleased with him) who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “No one hoards but one who is in error.”
Al-Nawawi (may Allaah have mercy on him) said: The scholars of Arabic language stated that the word khaati’ (translated here as ‘the one who is in error’) means one who is disobedient and a sinner, and this hadeeth clearly indicates that hoarding is haraam. End quote.
Islam forbids hoarding because of the harm that it causes to people.
The scholars differed as to what is included in hoarding. Some of them said that it refers only to food.
Some said that it applies to everything that people need and will be harmed if it is withheld. This is the view of the Maalikis and was narrated in one report from Ahmad. This is the correct view which is in accordance with the apparent meaning of the ahaadeeth.
Al-Shawkaani (may Allaah have mercy on him) said in Nayl al-Awtaar (5/262):
The apparent meaning of the ahaadeeth is that hoarding is haraam without distinguishing between food for humans and animals, and other things. The fact that the word food is specifically mentioned in some reports cannot be taken as specifying the general meaning of the other reports which speak of hoarding in general, rather it is mentioned by way of example. End quote.
Al-Ramli al-Shaafa’i said in his commentary on Asna al-Mataalib (2/39): They should apply it to everything that is usually needed of food and clothing. End quote.
This is in accordance with the reason for which hoarding is forbidden, which is to prevent harm being done to the people. This was also the view of the Standing Committee, as they stated in their fatwa no. 6374: It is not permissible to stock up anything that the people need, which is called hoarding, because the Prophet (peace and blessings of Allaah be upon him) said: “No one hoards but one who is in error.” Narrated by Ahmad, Muslim, Abu Dawood, al-Nasaa’i and Ibn Maajah. And because that causes hardship to the people.
But if the people are not in need of it, it is permissible to stock it up until it is needed, then it may be sold to them, so as to ward off harm and hardship from them. End quote.
Fataawa al-Lajnah al-Daa’imah (13/184).
And Allaah knows best.