The other thought is for you to make an offer to the bank to purchase it. They may give you a break and a good mortgage. But if there is interest in the home, make that inquiry.
In California is illegal to ask for 6 months rent in advance. If only notice of default is file(not notice of trust deed) it takes about 111 day for the bank to foreclose. So just stay and be aware of your situation. I also recommend talking to real estate attorney and file a complaint in a small claim court. Your are entitle to enjoy your residence without worry and that has be violated. Laws are in support of tenant. Find out if Notice of Default is filed or Notice of Trust deed.
Prudential California Realty
So it sounds like the owner knew they were going to be served with a Notice of Default (NOD) and leased to you anyway.
In most cases if the property were to be foreclosed the lender would want you to remain in the property and the lease would be transferred to the lender, who would then collect the rent payments.
It would be a good idea to start looking for another house now. However, you will not be automatically get kicked out of the house. The bank would provide you some time to move. Also, the bank may give you "cash for keys" but would also give you a timeline to move out by. I run into many renters in very similar situations as yours. I do alot of rentals as well so if you need further assistance, just give me call. Sorry to hear about your dilemna but hopefully things will work out for you. If you need any further help, let me know since my office is located in Rosemead CA.
You more than likely wont receive your money returned from the property owner. The situation is "happening across the country with tenants and foreclosures" you are not alone. I would be preparing to move however I believe you have months not to worry.
I would also contact an attorney determine what the procedures are where you can plan for estimated move .
SUGGESTION: You might want to try an apartment complex there move in specials reduced deposits, non foreclosures could be an option for you to investigate.