Water plays a crucial role both in the interstellar medium and on Earth. To constrain its formation mechanisms and its evolution through the star formation process, the determination of the water deuterium fractionation ratios is particularly suitable. Previous studies derived HDO/H$_2$O ratios in the warm inner regions of low-mass protostars. We here report a detection of the D$_2$O 1$_{1,0}$-1$_{0,1}$ transition toward the low-mass protostar NGC1333 IRAS2A with the Plateau de Bure interferometer: this represents the first interferometric detection of D$_2$O - and only the second solar-type protostar for which this isotopologue is detected. Using the observations of the HDO 5$_{4,2}$-6$_{3,3}$ transition simultaneously detected and three other HDO lines previously observed, we show that the HDO line fluxes are well reproduced with a single excitation temperature of 218$pm$21 K and a source size of $sim$0.5 arcsec. The D$_2$O/HDO ratio is $sim$(1.2$pm$0.5) $times$ 10$^{-2}$, while the use of previous H$_2^{18}$O observations give an HDO/H$_2$O ratio of $sim$(1.7$pm$0.8) $times$ 10$^{-3}$, i.e. a factor of 7 lower than the D$_2$O/HDO ratio. These results contradict the predictions of current grain surface chemical models and indicate that either the surface deuteration processes are poorly understood or that both sublimation of grain mantles and water formation at high temperatures ($gtrsim$230 K) take place in the inner regions of this source. In the second scenario, the thermal desorption of the grain mantles would explain the high D$_2$O/HDO ratio, while water formation at high temperature would explain significant extra production of H$_2$O leading to a decrease of the HDO/H$_2$O ratio.