The circumgalactic medium of high-redshift galaxies