Applied pressure drives the heavy-fermion antiferromagnet CeRhIn5 toward a quantum critical point that becomes hidden by a dome of unconventional superconductivity. Magnetic fields suppress this superconducting dome, unveiling the quantum phase transition of local character. Here, we show that [Formula: see text] magnetic substitution at the Ce site in CeRhIn5, either by Nd or Gd, induces a zero-field magnetic instability inside the superconducting state. This magnetic state not only should have a different ordering vector than the high-field local-moment magnetic state, but it also competes with the latter, suggesting that a spin-density-wave phase is stabilized in zero field by Nd and Gd impurities, similarly to the case of Ce0.95Nd0.05CoIn5 Supported by model calculations, we attribute this spin-density wave instability to a magnetic-impurity-driven condensation of the spin excitons that form inside the unconventional superconducting state.