Contact your local water company. They probably own the pipe from the street to a point in the yard. If your pipes are rotted, they will be doing some work there, too, perhaps you can convince them it is their responsibility. It is different in every locale.
Buying a HUD home... Usually there is a Truth in Housing disclosure. If this was on the Truth, your encumbered to pay for the fix. If not, call the realtor and cry real loud, HUD might have to pick up the tab.
Good luck, and if I save you some money, send me an email and I'll give you my address, and you can buy me a sandwich.