It is permissible for a person to buy shares in these companies if they do not deal in riba [usury/interest] (and they do not sell anything haraam and they do not do business in a manner that is not Islamic). But if they deal in riba then it is not permitted, because it is clearly established in the Qur’aan and Sunnah, and by scholarly consensus, that dealing in riba is haraam.
See Fataawa Islamiyyah, 2/392; see also Question no. 8590.
Sheikh Muhammed Salih Al-Munajjid