This paper investigates the extent to which corporate cash holdings protect firms from the adverse consequences of shocks to their borrowing cost. It develops a dynamic model of corporate investment and financing decisions subject to real and financial frictions. The calibrated model matches the substantial levels of corporate cash holdings across the firm size distribution and replicates the untargeted negative relationship between firm size and investment rates and cash holdings. Cash holdings help firms sustain investment when access to debt becomes costly or restricted. However, a shock to corporate borrowing conditions resembling the one seen in the Global Financial Crisis can significantly contract aggregate investment, especially by firms with lower cash holdings. These results highlight the capacity of shocks to corporate credit spreads to cause economic contractions, even in a context where firms hold cash buffers with the purpose of self-insuring against such shocks.