Abstract Long gamma-ray bursts (GRBs) are considered to originate from core collapse of massive stars. It is believed that the afterglow property is determined by the density of the material in the surrounding interstellar medium (ISM). Therefore, the circumburst density can be used to distinguish between an interstellar wind, n(R) ∝ R −k , and a constant-density medium (ISM), n ( R ) = const . Previous studies with different afterglow samples show that the circumburst medium of GRBs is neither simply supported by an interstellar wind nor completely favored by an ISM. In this work, our new sample consists of 39 GRBs with smoothly onset bump-like features in early X-ray afterglows, in which 20 GRBs have the redshift measurements. By using a smooth broken power-law function to fit the bumps of X-ray light curves, we derive the FWHM as the feature width (ω), as well as the rise and decay timescales of the bumps (T r and T d ). The correlations between the timescales of X-ray bumps are similar to those found previously in the optical afterglows. Based on the fireball forward shock model of the thin shell case, we obtain the distribution of the electron spectral index p and further constrain the medium density distribution index k. The new inferred k is found to be concentrated at 1.0, with a range from 0.2 to 1.8. This finding is consistent with previous studies. The conclusion of our detailed investigation for X-ray afterglows suggests that the ambient medium of the selected GRBs is not homogeneous, i.e., neither ISM nor the typical interstellar wind.