KABUL, Afghanistan — A blast went off Friday at a mosque packed with Shiite Muslim worshippers in northern Afghanistan, killing at least 25 and wounding dozens in the latest security challenge to the Taliban as they transition from insurgency to governance.