Catalyzes the second step of the reductive pyrimidine degradation, the reversible hydrolytic ring opening of dihydropyrimidines. Can catalyze the ring opening of 5,6-dihydrouracil to N-carbamyl-alanine and of 5,6-dihydrothymine to N-carbamyl-amino isobutyrate.