At least 25 people have been confirmed dead and more than 300 injured when a magnitude 5.8 earthquake hit Pakistan administered Kashmir and areas in Punjab province.