An analytic solution for propagation of blast waves in stellar interiors