We have investigated the water abundance in shock-heated molecular gas, making use of $Herschel$ measurements of far-infrared CO and H$_2$O line emissions in combination with $Spitzer$ measurements of mid-IR H$_2$ rotational emissions. We present far-infrared line spectra obtained with $Herschel$'s PACS instrument in range spectroscopy mode towards two positions in the protostellar outflow NGC 2071 and one position each in the supernova remnants W28 and 3C391. These spectra provide unequivocal detections, at one or more positions, of 12 rotational lines of water, 14 rotational lines of CO, 8 rotational lines of OH (4 lambda doublets), and 7 fine-structure transitions of atoms or atomic ions. We first used a simultaneous fit to the CO line fluxes, along with H$_2$ rotational line fluxes measured previously by $Spitzer$, to constrain the temperature and density distribution within the emitting gas; and we then investigated the water abundances implied by the observed H$_2$O line fluxes. The water line fluxes are in acceptable agreement with standard theoretical models for nondissociative shocks that predict the complete vaporization of grain mantles in shocks of velocity $v \sim 25$ km/s, behind which the characteristic gas temperature is $\sim 1300$ K and the H$_2$O/CO ratio is 1.2