We utilize the dispersion property of an X-ray filter material for the generation of a single sub-50-as pulse from high-order harmonics. The attosecond pulse, formed by selecting the spectral range of high-order harmonic radiation, contains an intrinsic chirp corresponding to the quadratic phase variation during a half cycle of a laser pulse. We show that this chirp can be compensated by using the negative group-delay dispersion of a thin X-ray filter, compressing the attosecond pulse down to sub-50-as.