In this paper we study the diffusion of an SIS-type epidemics on a network under the presence of a random environment, that enters in the definition of the infection rates of the nodes. Accordingly, we model the infection rates in the form of independent stochastic processes. To analyze the problem, we apply a mean field approximation, which allows to get a stochastic differential equations for the probability of infection in each node, and classical tools about stability, which require to find suitable Lyapunov's functions. Here, we find conditions which guarantee, respectively, extinction and stochastic persistence of the epidemics. We show that there exists two regions, given in terms of the coefficients of the model, one where the system goes to extinction almost surely, and the other where it is stochastic permanent. These two regions are, unfortunately, not adjacent, as there is a gap between them, whose extension depends on the specific level of noise. In this last region, we perform numerical analysis to suggest the true behavior of the solution.