We investigate the stability of the pion string in a thermal bath and a dense medium. We find that stability is dependent on the order of the chiral transition. String core stability within the experimentally allowed regime is found only if the chiral transition is second order, and even there the stable region is small, i.e., the temperature below which the core is unstable is close to the critical temperature of the phase transition. We also find that the presence of a dense medium, in addition to the thermal bath, enhances the experimentally accessible region with stable strings. We also argue that once the string core decays, the effective winding of the string persists at large distances from the string core. Our analysis is done both in the chiral limit, which is mainly what has been explored in the literature up to now, and for the physical $h e 0$ case, where a conceptual framework is set up for addressing this regime and some simple estimates are done.