All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
Poppy seeds are ritually pure and have many allowable usages. For example, they are used in some permissible industries such as drug-manufacturing (medicines) and in bakeries. They are also used in prohibited industries such as manufacturing narcotics to be used for intoxication purposes; therefore, Muslims should be heedful of that. Ibn ‘Umar reported that the Prophet said: “Every intoxicant is Khamr (wine) and every intoxicant is unlawful.” [Muslim]
Shaykh Ibn ‘Uthaymeen was once asked about the religious ruling on adding poppy seeds to pastries and desserts. He replied: "The basic principle is that it is permissible to consume poppy seeds and add them to pastries and the like as long as they are not proven to be hazardous to health or intoxicant if it is consumed in a greater quantity. In this case, they are considered unlawful.”
The Global Arabic Encyclopedia reads: "Poppy seeds, which are usually tiny, have no narcotic properties. They are sold as bird food and are also pressed to make poppy seed oil, which is used as cooking oil in making certain foods for human consumption. The hard outer covers of poppy seeds that remain after pressing the seeds (to produce poppy seed oil) are considered good cattle fodder for cows. Poppy seeds are also used to flavor food. Crushed poppy seeds can be sprinkled over bread or used as filling for pastries ... Opium is the latex produced from the ripe pods of the poppy tree where the seeds are formed. To obtain it, workers make shallow cuts in the pods (of the poppy tree) in the late afternoon so that the latex would leak out and dry all night long, then they return the following day to scrape off the dry latex, known as raw opium.” [End of quote]
Opium is unlawful because it is hazardous to health, destructive to the mind, and drives one away from the remembrance of Allaah. However, opium is not extracted from the poppy seeds, rather from the ripe pods of the poppy tree as described earlier. Therefore, it is permissible to use and sell poppy seeds unless proven to be hazardous to health or intoxicant; in this case, they would be unlawful.
Allaah Knows best.