We exploit an expansion in social protection to middle-income households to provide evidence on how middle-income households cope with economic shocks and how to build their resilience. We use a regression discontinuity design around the eligibility cutoff for a program that delivered monthly cash transfers mainly through bank accounts in Colombia. We find no impacts on food security, education, and health outcomes--the target outcomes of antipoverty programs. In contrast, program eligibility increases non-food consumption and reduces debt for routine expenses. Bank account ownership increases by 16%, and beneficiaries are more likely to borrow from formal lenders. Amid systemic and idiosyncratic shocks, the program prevents middle-income households from reducing non-food spending and acquiring debt for routine expenses. Moreover, when hit by severe shocks, beneficiary households substitute away from predatory loans. The results suggest that middle-income households are constrained by lack of insurance and that social protection can build middle-income households' resilience to shocks through both cash transfers and by integrating beneficiaries into formal credit markets.