This website is under review. Do not rely on it for final rulings.
Machine translation
Question
I work in the field of website security, specifically in what is called "bug bounty", where a website owner opens his website to us so that we can test it, and he pays for every vulnerability we find. I recently tested one website and found a vulnerability, so I reported it, and by Allah's grace I received its payment. But this website has a paid section, meaning you buy a subscription for a period of time and benefit from the website's paid services. My question here: I wanted to buy these services (which will become available for me to use for a specific period of time), but my purpose is not to use these services, rather to test them, hoping to find a vulnerability that I can sell to the website owner. But it occurred to me that this may be considered gambling, because my intention is not to benefit from the website's services that become available to me after subscribing, but to test them in order to find security vulnerabilities that may not exist. I searched the internet for a fatwa, but everything I found only made matters worse, and things became confused in my mind, and I started to liken trade to gambling, since both involve risk. I ask for help with my original question: is buying those services in order to test them and obtain money gambling, even though the service has become available to me at any time, and it is in fact a beneficial service, but I do not care about that benefit as much as I care about finding security vulnerabilities in it? Also, I ask you to clarify the difference between trade and gambling, and whether using paid Facebook ads to promote my products involves some gambling too, since I do not know whether I will get sales from them or not.
Answer
All praise is due to Allah, and peace and blessings be upon the Messenger of Allah, and upon his family and companions. To proceed:
It is true that both trade and gambling involve risk, but the two risks are vastly different. The risk in trade is incidental and not intended, and there is no injustice in it, neither to the seller nor to the buyer, for both benefit. They may profit equally, or one may profit more than the other, but neither is left without benefit, and neither's loss is total. There is no consuming of wealth by falsehood in it.
Unlike gambling, where the risk is inherent and intended, and the loss is certain and inevitable for one of the two parties: one of them loses all that he paid, while the other is a wrongdoer who consumes wealth by falsehood.
Ibn al-Qayyim said in "Zad al-Ma'ad": Risk-taking is of two kinds. The first is trade risk, which is that a person buys a commodity intending to sell it at a profit, and relies on Allah in that. The second is the gambling (maysir), which involves consuming wealth falsely, and this is what Allah and His Messenger prohibited ... In this type, one of the two has gambled against the other and wronged him, and one of them complains about the other. This is unlike the merchant who bought the commodity and then its price fell. That is from Allah, the Glorified, and no one has any means to prevent it, and such a person does not complain about the seller. End of quote.
Regarding buying the mentioned services in order to test them to find a loophole and then selling it to the owner of the website, there is no gambling in that! Even if the questioner does not care about the benefit of those services, because he paid money in exchange for buying a useful service, whether he needs it or does not need it.
The same applies to paying money for sponsored advertisements, even if one does not know whether the advertisements will bring sales or not, because he paid money in return for a permissible benefit, which is promoting products.
And Allah knows best.
الحمد لله، والصلاة والسلام على رسول الله، وعلى آله وصحبه، أما بعد:
فصحيح أن كلاً من التجارة والقمار فيه مخاطرة، ولكن شتان ما بين المخاطرتين، فمخاطرة التجارة عارضة غير مقصودة، وليس فيها ظلم لا للبائع ولا للمشتري، فكلاهما مستفيد، وقد يربحان معًا بالقدر نفسه، وقد يكون ربح أحدهما أعلى من الآخر، ولكن لا يخلو الآخر من فائدة، ولا تكون خسارته تامة، فليس فيها أكل للمال بالباطل.
بخلاف القمار، فالمخاطرة فيه أصلية مقصودة، والخسارة فيه متحققة لأحد الطرفين ولا بد، فأحدهما خاسر لكل ما دفع، والآخر ظالم، آكل للمال بالباطل.
قال ابن القيم في «زاد المعاد»: والمخاطرة مخاطرتان: مخاطرة التجارة، وهو أن يشتري السلعة بقصد أن يبيعها بربح، ويتوكل على الله في ذلك. والخطر الثاني: الميسر الذي يتضمن أكل المال بالباطل، فهذا الذي حرمه الله ورسوله ... هذا النوع يكون أحدهما قد قمر الآخر وظلمه، ويتظلم أحدهما من الآخر، بخلاف التاجر الذي قد اشترى السلعة ثم بعد هذا نقص سعرها، فهذا من الله سبحانه، ليس لأحد فيه حيلة، ولا يتظلم مثل هذا من البائع. اهـ.
وبخصوص شراء الخدمات المذكورة، بغية اختبارها للعثور على ثغرة، وبيعها لصاحب الموقع، فليس في ذلك قمار! ولو كان السائل لا يهتم بمنفعة تلك الخدمات؛ لأنه دفع المال في مقابل شراء خدمة نافعة، سواء أكان يحتاجها أو لا يحتاجها.
وكذلك الحال في دفع المال في الإعلانات الممولة، وإن كان لا يعلم هل ستأتي الإعلانات بمبيعات أم لا؟ لأنه دفع المال نظير منفعة مباحة، وهي الترويج للمنتجات.
والله أعلم.
More fatwas from our library on the same topic