review this law (Protecting Tenants at Foreclosure Act of 2009): http://www.nlihc.org/doc/701-704-Public-Law-111-22.pdf
At a minimum, if the house is sold at foreclosure auction to a purchaser who will occupy it as a primary residence, they will have to give you at least 90 days written notice to vacate. If it is simply sold back to the bank or mortgage company holding the mortgage, they must observe the terms of your lease (that is, you will enjoy the entirety of your lease term). Either way, you will almost certainly be able to enjoy the full term of your lease since we are about 90 days from September 30th, 2010. California state law may give you even more rights, but cannot reduce the rights given by this federal law.
The Protecting Tenants at Foreclosure Act requires that tenants without a lease be given 90 days notice AFTER the sale to vacate the premises, or, if there is a written lease such as yours, that you be permitted to remain in the premises until the end of the lease ter on 9/30/10.
There is an exception--if the buyer intends to use the property as a principal residence, or if the buyer is a bank and they have a contract to sell the property to someone intending to use the property as a principal residence, then the tenant with a written lease can not stay until the end of the term, but still has to be given 90 days' notice.
The law is not well written. It does not address the question of whether rent must be paid to the new owner. Once the property is sold at foreclosure, there is no lease, unless you and the new owner agree to a new lease. The old lease no longer exists so you do not have an obligation to pay rent on it, and unless you and the new owner make an agreement, there is no rent obligation on your part to make.
As for legal recourse, I presume you mean against the landlord? Well, in your particular situation, I do not see that you will be prejudiced by the sale, meaning you will have suffered no damages, since you will be able to stay until 9/30 no matter what. If you had just signed a lease and your lease term would have ended 5/31/11 and you have to move and your new rent is higher, then you might have a cause of action against the old landlord, but lets face it, the old landlord is running for cover. You would have to start chasing him, and as you can see, you will be standing in line behind a whole bunch of other creditors. You might be able to recover money through a garnishment of the bank, if CA law permits.