Depends what you mean by "bad". All lenders look at primarily 3 factors in evaluating a mortgage applicant: Income, Credit, & Down Payment.
To qualify for most loans you need strength in all 3 of those areas, otherwise you're looked at as a bad risk.
Now if you have a weakness in ONE of those areas, strength in the other two can make it possible to get a mortgage. Example...someone with long stable history at their job and a good income and a large down payment (20% or more) may be able to get a loan with poor credit.
But someone with poor credit and not a lot of money in the bank is going to have a tough time.
FHA would probably be your best option. The FHA guidelines are more forgiving and don't require perfect credit, but truly bad credit is going to be a no-go. Most lenders require at least a 640 credit score to qualify for FHA, but there are a small few that will go to 600 and even a smaller few who will do it at 580. But that is about it.
My advice would be to hold off on buying until you get your finances and credit in order. Some Realtors would have you believe that NOW is the only time to buy and that if you wait you are a fool because housing prices are going to sky rocket. The truth is, as long as you want to buy a house there will be someone out there that wants to sell it to you, and in the long run you'll probably be better off getting your ducks in a row before doing anything because even if you have to pay a little more for a house you will probably save that much or more in interest.
Hope this helps! If you feel this info is helpful then please leave positive feedback!