Increase in value does not create any problem if the activities of the company are lawful and no Haraam activities are involved like RIBA. If the company deals with RIBA or does any Haraam business, it will be Haraam to buy or keep such shares. Money generated from RIBA or any other Haraam activities is unlawful to use in any way even in charity. It must be given to the Marje; of Taqleed to spend it on deserving cases or seek his permission to give it in charity.
Wassalam..