We study stabilization of an unstable cosmic string associated with spontaneously broken $U(1)_R$ symmetry, which otherwise causes a dangerous roll-over process. We demonstrate that in a gauge mediation model, messengers can receive enough corrections from the thermal plasma of the supersymmetric standard model particles to stabilize the unstable modes of the string.