Legally, you can get a loan: there is no law or regulation stating that someone who had a foreclosure cannot get a mortgage or other loan for a home. On the other hand, however, there is also no law requiring a lender to lend to you if you have a foreclosure: lenders can freely decide whether or not to lend. So you need to find a lender willing to lend to you: you will increase the chance of doing so if you pay down other debt first (lowing your debt to income ratio), put down a larger down payment (e.g. 20% or more), and are conservative about how expensive a home you look to buy.