All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions.
The ruling on subscribing in staff provident fund is based on the method of investment run by the fund, so if the transactions were stipulated in the fund's system not to violate Sharia rulings, then subscribing in it is permissible.
But if they (Transactions) were clearly prohibited such as is the case with usury or trading with prohibited items, then subscribing in it is impermissible and the committee in charge of the fund isn't permitted to deal with those suspicious transactions, for Allah, The Exalted, said "(What means):" O ye who believe! Squander not your wealth among yourselves in vanity, except it be a trade by mutual consent." [An-Nisa']. In addition, An-Numan bin Bashir narrated that the Messenger of Allah (PBUH) said: "The lawful is clear and the unlawful is clear," [Related by Al-Bukhary].
Besides, if the transactions stipulated in the fund were lawful but offered unlawful dealing with investment application, then subscribing in it is determined by the form of profits earned from those investments, as stated in resolution No. (271) by the Board of Jordanian Iftaa' regarding the ruling of similar cases as follows:" Fourth: As for companies with mixed transactions (lawful & unlawful), the source of their business is lawful, but they accidentally dealt in some unlawful contracts or sold unlawful items, although these aren`t their basic activities nor stipulated in their registered articles of association. This mixed type must meet two conditions in order for trading in their shares to become permissible:
1-The borrowed or deposited amounts, involving usury, mustn't exceed 25% of the overall value of the company`s shares.
2-Revenues and expenditures resulting from that incidental unlawful transaction-as defined earlier-mustn't exceed 5% from the company`s overall revenues.
Therefore, the ruling of subscribing in the fund and earning profits is to be determined based on the above resolution, but if the violations are of the suspicious matters or were controversial issues among contemporary jurists such as authorizing the purchaser to pay the goods' value and taking delivery, then there is no harm in subscribing in it, since the people in charge of the fund are the ones to burden the responsibility of observing the rulings of Sharia in this regard. Further, it is obligatory upon a Muslim-in spite of the conditioned permissibility- to get rid of unlawful profit percentage given due to his contribution in it and to spend it as a charity so long as the shareholder won't benefit from it at all. And Allah knows best.