Exposed Foundation Rebar

This is one of the ultimate foundation nightmares for any
homeowner, because there is relatively little you can do about it,
because the rebar isn't located where it should be.
The actual problem isn't the fact that it's exposed and rusting, but the
fact that it isn't in the correct position. The correct position for the
rebar would be in the center of the foundation footing.
Most foundation footings are 12 inches wide, putting the rebar 6 inches
away from the exterior side of the building foundation.
(The minimum distance for rebar in a structural concrete
foundation is 3 inches away from the end or edge of the concrete
footing, but you could verify that by checking your local building
codes)
Like I said, there is very little that you can do in a situation like
this, to correct the structural problem, but you can always patch and
repair it.
Home Repair Tip: To fix something like this, you could chip away all of
the loose concrete around the exposed foundation rebar and then remove
as much rust as possible from the rebar itself.
After you have done the steps above, you can patch the building
foundation with any type of concrete patching cement mixtures that you
feel will work the best. These types of patching compounds can usually
be found at your local home improvement center or hardware stores.
Remember, all you're doing is patching the foundation, you're not
repairing any structural damage. If you're worried about structural
foundation damage, you should contact a professional in your area to
evaluate your particular situation.