This paper puts forward a novel approach to the analysis of direct contagion in financial networks. Financial systems are here represented as flow networks -i.e., directed and weighted graphs endowed with source nodes and sink nodes - and the propagation of losses and defaults, originated by an exogenous shock, is here represented as a flow that crosses such a network. In establishing existence and uniqueness of such a flow function, we address a know problem of indeterminacy that arise, in financial networks, from the intercyclicity of payments. Sufficient and necessary conditions for uniqueness are pinned down. We embed this result in an algorithm that, while computing the propagation caused by a shock, controls for the emergence of possible indeterminacies. We then apply some properties of network flows to investigate the relation between the structures of a financial network-i.e. the size and the pattern of obligations - and its exposure to default contagion.