Yes you do.
However, and this may seem a contradiction to your feeling of vulnerability, you need to have a proper lease in place.
You should seek counsel from a professional in your area for the details. That may mean you have to pick up the phone and make a call.
Be aware, 'In Foreclosure' can mean many things to a reader. The reality is 'In Foreclosure' can be a superficial situation (thank you Realty TRAC) or it can mean emanate lose of ownership. It is incredibly important to know EXACTLY what the status of that property is. It may be YEARS, if ever, anything significant to a tenant occurs.