  NGC 7129 FIRS 2 is a young intermediate-mass (IM) protostar, which is
associated with two energetic bipolar outflows and displays clear signs of the
presence of a hot core. It has been extensively observed with ground based
telescopes and within the WISH Guaranteed Time Herschel Key Program. We present
new observations of the C18O 3-2 and the HDO 3_{12}-2_{21} lines towards NGC
7129 FIRS 2. Combining these observations with Herschel data and modeling their
emissions, we constrain the C18O and HDO abundance profiles across the
protostellar envelope. In particular, we derive the abundance of C18O and HDO
in the hot core. The intensities of the C18O lines are well reproduced assuming
that the C18O abundance decreases through the protostellar envelope from the
outer edge towards the centre until the point where the gas and dust reach the
CO evaporation temperature (~20-25 K) where the C18O is released back to the
gas phase. Once the C18O is released to the gas phase, the modelled C18O
abundance is found to be ~1.6x10^{-8}, which is a factor of 10 lower than the
reference abundance. This result is supported by the non-detection of C18O 9-8,
which proves that even in the hot core (T_k>100 K) the CO abundance must be 10
times lower than the reference value. Several scenarios are discussed to
explain this C18O deficiency. One possible explanation is that during the
pre-stellar and protostellar phase, the CO is removed from the grain mantles by
reactions to form more complex molecules. Our HDO modeling shows that the
emission of HDO 3_{12}-2_{21} line is maser and comes from the hot core
(T_k>100 K). Assuming the physical structure derived by Crimier et al. (2010),
we determine a HDO abundance of ~0.4 - 1x10^{-7} in the hot core of this IM
protostar, similar to that found in the hot corinos NGC 1333 IRAS 2A and IRAS
16293-2422.
