Working for a company that was established with a riba-based loan and is still borrowing money on the basis of riba
Question

                What is the ruling on working for a company that was founded with a riba-based loan and until the present is still taking loans, and every time it pays off one loan, it takes out another for a larger amount… And via these loans it funds its projects and pays the salaries of its employees? Please note that the individual concerned was not aware of these loans, and he works for the company as a programmer, and has nothing to do with the finances at all; furthermore, the programs that he designs are not used in the financial affairs of the company. If it is not permissible for him to work for this company, can he continue to work there until he finds another job, or does he have to leave it immediately? With regard to the money that he has saved from his salary, is it halaal or is it to be regarded as haraam?
Praise be to Allah.
	If the projects that the company undertakes are permissible 
	projects, and the programmer asked about does not directly deal with the 
	finances of the company, as you said, then it is permissible for him to work 
	with that company, but it is better for him to look for other work, because 
	it is makrooh to work with those who deal with riba. 

	The sin of riba is borne by the company and those who 
	directly deal with riba or help with it, or approve of it. As for the salary 
	of the programmer, he has received it in return for permissible work. 

	Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked 
	about an employee who works for a company that deals with banks and takes 
	out riba-based loans from them, and gives the employees their salaries from 
	those riba-based loans. 

	He replied: Does this employee write the contracts between 
	the company and the banks? 

	Questioner: He does not write them; rather it is me, O Shaykh! 
	(i.e., he is the employee about whom the question is being asked). 

	Shaykh: Then you do not write down the riba-based contract, 
	you do not witness it, and you do not take or give riba, so I do not see 
	anything wrong with this, so long as the work you do for the company is 
	sound (and free of any haraam element), in which case the burden of sin is 
	borne by the company itself. If you do not go to the bank or sign any 
	transaction with the bank, then there is no sin on you. This company – first 
	of all – was not established for the purpose of dealing in riba, and it is 
	not like the bank concerning which we would tell you not to take a job 
	there. It was not established for the purpose of dealing in riba. Secondly, 
	you are not dealing directly with the riba, by writing it down, witnessing 
	it or offering any other service connected to it; your work is separate from 
	the riba.

	End quote from al-Baab al-Maftooh (59/15). 

	And Allah knows best.