If the home is actually foreclosed upon, by first or second mortgagee, then whomever owns the home after foreclosure has the right (but not the obligation) to evict you. However, in foreclosure, you can't be evicted while you still own the home (e.g. not until and unless the foreclosure is complete and you are no longer the owner).