You CAN hear explosions in space if the expanding gas shell from the detonation still has enough mass when it impinges on whatever craft or habitat you are in. This can happen at a considerable distance, but it is not the same as sound waves propagating through a fluid medium, which cannot happen in a vacuum.