In this paper, we set up a stochastic model for the dynamics of active Rab5 and Rab7 proteins on the surface of endosomes and the acidification process that govern the virus–endosome fusion and endosomal escape of pH-responsive nanoparticles. We employ a well-known cut-off switch model for Rab5 to Rab7 conversion dynamics and consider two random terms: white Gaussian and Poisson noises with zero mean. We derive the governing equations for the joint probability density function for the endosomal pH, Rab5 and Rab7 proteins. We obtain numerically the marginal density describing random fluctuations of endosomal pH. We calculate the probability of having a pH level inside the endosome below a critical threshold and therefore the percentage of viruses and pH-responsive nanoparticles escaping endosomes. Our results are in good qualitative agreement with experimental data on viral escape.