Context. The circumgalactic medium (CGM) is the location where the interplay between large-scale outflows and accretion onto galaxies occurs. Metals in different ionization states flowing between the circumgalactic and intergalactic mediums are affected by large galactic outflows and low-ionization state inflowing gas. Observational studies on their spatial distribution and their relation with galaxy properties may provide important constraints on models of galaxy formation and evolution. Aims. The main goal of this paper is to provide new insights into the spatial distribution of the circumgalactic of star-forming galaxies at 1.5 < z < 4.5 (⟨ z⟩∼2.6) in the peak epoch of cosmic star formation activity in the Universe. We also look for possible correlations between the strength of the low- and high-ionization absorption features (LIS and HIS) and stellar mass, star formation rate, effective radius, and azimuthal angle ϕ that defines the location of the absorbing gas relative to the galaxy disc plane. Methods. The CGM has been primarily detected via the absorption features that it produces on the continuum spectrum of bright background sources. We selected a sample of 238 close pairs from the VIMOS Ultra Deep Survey to examine the spatial distribution of the gas located around star-forming galaxies and generate composite spectra by co-adding spectra of background galaxies that provide different sight-lines across the CGM of star-forming galaxies. Results. We detect LIS (C II and Si II) and HIS (Si IV, C IV) up to separations ⟨ b⟩ = 172 kpc and 146 kpc. Beyond this separation, we do not detect any significant signal of CGM absorption in the background composite spectra. Our Ly α, LIS, and HIS rest-frame equivalent width ( W0) radial profiles are at the upper envelope of the W0 measurements at lower redshifts, suggesting a potential redshift evolution for the CGM gas content producing these absorptions. We find a correlation between C II and C IV with star formation rate and stellar mass, as well as trends with galaxy size estimated by the effective radius and azimuthal angle. Galaxies with high star formation rate (log[SFR/( M⊙ yr −1)] > 1.5) and stellar mass (log[ M⋆/ M⊙] > 10.2) show stronger C IV absorptions compared with those low SFR (log[SFR/( M⊙ yr −1)] < 0.9) and low stellar mass (log[ M⋆/ M⊙] < 9.26). The latter population instead shows stronger C II absorption than their more massive or more star-forming counterparts. We compute the C II/C IVW0 line ratio that confirms the C II and C IV correlations with impact parameter, stellar mass, and star formation rate. We do not find any correlation with ϕ in agreement with other high-redshift studies and in contradiction to what is observed at low redshift where large-scale outflows along the minor axis forming bipolar outflows are detected. Conclusions. We find that the stronger C IV line absorptions in the outer regions of these star-forming galaxies could be explained by stronger outflows in galaxies with higher star formation rates and stellar masses that are capable of projecting the ionized gas up to large distances and/or by stronger UV ionizing radiation in these galaxies that is able to ionize the gas even at large distances. On the other hand, low-mass galaxies show stronger C II absorptions, suggesting larger reservoirs of cold gas that could be explained by a softer radiation field unable to ionize high-ionization state lines or by the galactic fountain scenario where metal-rich gas ejected from previous star formation episodes falls back to the galaxy. These large reservoirs of cold neutral gas around low-mass galaxies could be funnelled into the galaxies and eventually provide the necessary fuel to sustain star formation activity.