Veiling is ubiquitous at different wavelength ranges in classical T Tauri stars. The hot spot alone is not enough to explain the shallow photospheric infrared lines in accreting systems, and it suggests that another source contributes to the veiling in the near infrared. The inner disk is often quoted as the additional emitting source to explain infrared veiling. We used a sample of accreting stars observed with the CFHT/SPIRou spectrograph to measure the near-infrared veiling along the YJHK bands to understand its origin and time scale variability. We compared the computed veiling with accretion and inner disk diagnostics from photometric observations gathered in the literature. Our data provide further evidence that the veiling in the infrared increase with the wavelength, veiling growths from Y to K band for most of the targets in our sample, similar to results found in the literature. The infrared veiling agrees with near-infrared emission excess obtained using photometric data. However, we also find a linear correlation between the veiling and the accretion properties of the system, showing that accretion contributes to inner disk heating and, consequently, to the inner disk emission excess. We also show a connection between the near-infrared veiling and the system's inclination with respect to our line of sight, which reflects the reduction of the visible part of the edge of the inner disk, where the near-infrared emission excess arises as the inclination of the system increases.