We characterize the distributions of size and duration of avalanches propagating in complex networks. By an avalanche we mean the sequence of events initiated by the externally stimulated excitation of a network node, which may, with some probability, then stimulate subsequent excitations of the nodes to which it is connected, resulting in a cascade of excitations. This type of process is relevant to a wide variety of situations, including neuroscience, cascading failures on electrical power grids, and epidemiology. We find that the statistics of avalanches can be characterized in terms of the largest eigenvalue and corresponding eigenvector of an appropriate adjacency matrix that encodes the structure of the network. By using mean-field analyses, previous studies of avalanches in networks have not considered the effect of network structure on the distribution of size and duration of avalanches. Our results apply to individual networks (rather than network ensembles) and provide expressions for the distributions of size and duration of avalanches starting at particular nodes in the network. These findings might find application in the analysis of branching processes in networks, such as cascading power grid failures and critical brain dynamics. In particular, our results show that some experimental signatures of critical brain dynamics (i.e., power-law distributions of size and duration of neuronal avalanches) are robust to complex underlying network topologies.