5'->3' double-stranded DNA exonuclease which may also contain a cryptic 3'->5' double-stranded DNA exonuclease activity. Also exhibits endonuclease activity against 5'-overhanging flap structures similar to those generated by displacement synthesis when DNA polymerase encounters the 5'-end of a downstream Okazaki fragment. Required for DNA mismatch repair (MMR) (By similarity). Binds 2 magnesium ions per subunit. They probably participate in the reaction catalyzed by the enzyme. May bind an additional third magnesium ion after substrate binding. Belongs to the XPG/RAD2 endonuclease family. EXO1 subfamily.