New York(CNN Business) Wells Fargo executives were warned that the bank's auto insurance program was harming customers four years before it was shut down, according to a lawsuit.

Wells Fargo admitted last year to charging hundreds of thousands of borrowers for auto insurance they didn't need. Some customers even had their vehicles repossessed because of the needless charges.

Members of Wells Fargo's executive risk management committee were alerted in April and July 2012 to "critical issues" about the insurance program known as collateral protection insurance, or CPI, a complaint unsealed by a judge on Monday alleges.

"Although senior Wells Fargo executives had long known that the CPI scheme harmed customers, Wells Fargo only shut it down in September 2016," the class action lawsuit brought by customers said.

The executives who were allegedly informed of Wells Fargo's flawed insurance program include David Julian, the bank's former chief auditor.

Wells Fargo (WFC) announced last month that Julian had taken a leave of absence. The bank gave few details about the sudden change, other than to say the move was linked to "ongoing reviews" by regulators into the bank's retail sales practices.

Reached by phone on Wednesday, Julian declined to comment on the allegations or to detail why he is on a leave of absence.

The lawsuit alleges that other executives informed of the auto insurance problems include former chief administrative officer Pat Callahan, former general counsel James Strother and former chief risk officer Michael Loughlin. Those executives, all of whom retired over the past three years, could not be reached for comment.

Kenneth Zimmerman, former head of deposit products at Wells Fargo, was also named in the lawsuit. Zimmerman took a leave of absence in early 2016 and left in July 2017, according to the Wall Street Journal. Zimmerman could not be reached for comment.

News of the unsealed complaint was first reported by Reuters.

In a statement, Wells Fargo pointed out that the bank ended the insurance program in September 2016.

"Since then, we have been reviewing customer accounts and developing a remediation plan -- which we hope to finalize very soon -- to provide impacted customers with the compensation they deserve," the bank said.

Up to 20,000 cars repossessed

Wells Fargo set aside $241 million in the third quarter to go towards refunding customers who were harmed by the insurance program.

The bank has faced a series of scandals over allegedly abusing customers and even employees. Wells Fargo has admitted to opening millions of bank and credit card accounts without customers' knowledge. And Wells Fargo has said it charged homebuyers mortgage fees they didn't deserve. Earlier this week, Wells Fargo identified another 145 customers who lost their homes due to a computer glitch.

The auto insurance class action lawsuit was brought by more than a dozen borrowers who were charged for insurance after obtaining car loans through Wells Fargo.

Wells Fargo has said that up to 570,000 auto loan borrowers were charged for car insurance without their knowledge. As many as 20,000 of those customers may have defaulted on their car loans or had their vehicles repossessed in part due to these unnecessary insurance costs.

Samir Hanef, a clinical social worker from North Carolina, said his Honda Civic was repossessed even though he kept up with his car loan payments each month.

"My car was held as extortion," Hanef told CNN last year, "and I was forced to pay for Wells Fargo's mistake."