  The origin of excess of X-ray column density with respect to optical
extinction in Gamma-ray bursts (GRBs) is still a puzzle. A proposed explanation
of the excess is the photoelectric absorption due to the intervening clouds
along a GRB's line-of-sight. We here test this scenario by using the
intervening \ion{Mg}{2} absorption as a tracer of the neutral hydrogen column
density of the intervening clouds. We identify a connection between large X-ray
column density (and large column density ratio of
$\mathrm{\log(N_{H,X}/N_{HI})}\sim0.5$) and large neutral hydrogen column
density probed by the \ion{Mg}{2} doublet ratio (DR). In addition, GRBs with
large X-ray column density (and large ratio of
$\mathrm{\log(N_{H,X}/N_{HI})}>0$) tend to have multiple saturated intervening
absorbers with $\mathrm{DR<1.2}$. These results therefore indicate an
additional contribution of the intervening system to the observed X-ray column
density in some GRBs, although the contribution of the host galaxy alone cannot
be excluded based on this study.
