In this paper, we analyze the (exact) stochastic dynamics of spreading processes taking place in complex networks. The analysis of this dynamics is, in general, very challenging since its state space grows exponentially with the network size. A common approach to overcome this challenge is to apply moment-closure techniques, such as the popular mean-field approach, to approximate the exact stochastic dynamics via ordinary differential equations. However, most existing moment-closure techniques do not provide quantitative guarantees on the quality of the approximation, limiting the applicability of these techniques. To overcome this limitation, we propose a novel moment-closure technique with explicit quality guarantees based on recent results relating the multidimensional moment problem with semidefinite programming. We illustrate how this technique can be used to derive upper and lower bounds on the exact (stochastic) dynamics of a variety of networked spreading processes, such as the SIS, SI, and SIR models. Moreover, we provide a simplified version of this moment-closure technique to approximate the dynamics of the probabilities of infection of each node using a linear number of piecewise-affine differential equations. Finally, we demonstrate the validity of our bounds via numerical simulations in a real-world social network.