Starfish are quite delicate, and swings in parameters can cause distress, which is why many starfish in captivity seldom live as long as they do in the wild. If it is a bacterial infection, there is not really anything you can do. If the infection is localized to an arm, you could cut off the arm and it will regenerate, though I don't suggest trying it. If the infection has reached the central disc, though, it will either fight it off, die, or split and try to regenerate.