Galaxy redshift surveys, such as the 2-Degree-Field Survey (2dF) 1, Sloan Digital Sky Survey (SDSS) 2, 6-Degree-Field Survey (6dF) 3, Galaxy And Mass Assembly survey (GAMA) 4 and VIMOS Public Extragalactic Redshift Survey (VIPERS) 5, have shown that the spatial distribution of matter forms a rich web, known as the cosmic web 6 . Most galaxy survey analyses measure the amplitude of galaxy clustering as a function of scale, ignoring information beyond a small number of summary statistics. Because the matter density field becomes highly non-Gaussian as structure evolves under gravity, we expect other statistical descriptions of the field to provide us with additional information. One way to study the non-Gaussianity is to study filaments, which evolve non-linearly from the initial density fluctuations produced in the primordial Universe. In our study, we report the detection of lensing of the cosmic microwave background (CMB) by filaments, and we apply a null test to confirm our detection. Furthermore, we propose a phenomenological model to interpret the detected signal, and we measure how filaments trace the matter distribution on large scales through filament bias, which we measure to be around 1.5. Our study provides new scope to understand the environmental dependence of galaxy formation. In the future, the joint analysis of lensing and Sunyaev-Zel'dovich observations might reveal the properties of 'missing baryons', the vast majority of the gas that resides in the intergalactic medium, which has so far evaded most observations.