At least 25 passengers are injured as eight carriages of a train go off the tracks in northern India.