The selection of high redshift sources from broad-band photometry using the Lyman-break galaxy (LBG) technique is a well established methodology, but the characterization of its contamination for the faintest sources is still incomplete. We use the optical and near-IR data from four (ultra)deep Hubble Space Telescope legacy fields to investigate the contamination fraction of LBG samples at z~5-8 selected using a colour-colour method. Our approach is based on characterizing the number count distribution of interloper sources, that is galaxies with colors similar to those of LBGs, but showing detection at wavelengths shorter than the spectral break. Without sufficient sensitivity at bluer wavelengths, a subset of interlopers may not be properly classified, and contaminate the LBG selection. The surface density of interlopers in the sky gets steeper with increasing redshift of LBG selections. Since the intrinsic number of dropouts decreases significantly with increasing redshift, this implies increasing contamination from misclassified interlopers with increasing redshift, primarily by intermediate redshift sources with unremarkable properties (intermediate ages, lack of ongoing star formation and low/moderate dust content). Using Monte Carlo simulations, we estimate that the CANDELS deep data have contamination induced by photometric scatter increasing from ~2% at z~5 to ~6% at z~8 for a typical dropout color >1 mag, with contamination naturally decreasing for a more stringent dropout selection. Contaminants are expected to be located preferentially near the detection limit of surveys, ranging from 0.1 to 0.4 contaminants per arcmin2 at J=30, depending on the field considered. This analysis suggests that the impact of contamination in future studies of z>10 galaxies needs to be carefully considered.