The paper analyses the contagion channels of the European financial system through the stochastic block model (SBM). The model groups homogeneous connectivity patterns among the financial institutions and describes the shock transmission mechanisms of the financial networks in a compact way. We analyse the global financial crisis and European sovereign debt crisis and show that the network exhibits a strong community structure with two main blocks acting as shock spreader and receiver, respectively. Moreover, we provide evidence of the prominent role played by insurances in the spread of systemic risk in both crises. Finally, we demonstrate that policy interventions focused on institutions with inter-community linkages (community bridges) are more effective than the ones based on the classical connectedness measures and represents consequently, a better early warning indicator in predicting future financial losses.