We study the dynamics of secondary infections on networks, in which only the individuals currently carrying a certain primary infection are susceptible to the secondary infection. In the limit of large sparse networks, the model is mapped to a branching process spreading in a random time-sensitive environment, determined by the dynamics of the underlying primary infection. When both epidemics follow the Susceptible-Infective-Recovered model, we show that in order to survive, it is necessary for the secondary infection to evolve on a timescale that is closely matched to that of the primary infection on which it depends.