I develop a novel framework for studying network formation with continuum populations. I use the framework to examine contagion and resilience in endogenous networks, with applications to misinformation, supply chains, financial contagion, and epidemics. I examine the equilibrium effects of policies that mitigate contagion externalities and find that interconnectedness and concentration increase in response to interventions. This general equilibrium response negates the benefits of interventions and creates a “network hazard.” Despite interventions that mitigate contagion ex post, contagion and volatility are exacerbated and welfare and resilience are reduced ex ante.