To understand the mechanism of fuel oxidation, in the event of exposure of spent nuclear fuel to groundwater in a final repository, the key parameters are the diffusion coefficients for oxygen and water in UO2. In the temperature range relevant for geological disposal (20-100°C), we conducted static corrosion experiments, for 3-6 months, with 18O-labelled water on different UO2 matrices (single-crystal, polycrystalline UO2, SIMFUEL) so that we could evaluate the penetration of the 18O-tracer by means of secondary ion mass spectrometry depth profiling, measuring the 18O/16O ratio. Fick's second law was applied to fit the diffusion profiles in the single crystal and to determine the chemical diffusion coefficient of oxygen, which was found to be in good agreement with the Arrhenius plot extrapolation from high-temperature literature data. Profiles of polycrystalline UO2 could be fitted with the Levine-MacCallum model, showing that grain boundaries behave like high-diffusivity paths. The presence of secondary phases precipitated along the grain boundaries, as in the case of SIMFUEL, showed a hindering effect for this grain-boundary diffusion, reducing the measured penetration depth.