5'->3' double-stranded DNA exonuclease which may also possess a cryptic 3'->5' double-stranded DNA exonuclease activity. Functions in DNA mismatch repair (MMR) to excise mismatch-containing DNA tracts directed by strand breaks located either 5' or 3' to the mismatch. 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 (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. Interacts with the mlh1-pms2 heterodimer via mlh1. Interacts with msh3. Interacts with the msh2-msh6 heterodimer via msh2, and this interaction may increase the processivity of the 5'->3' exonuclease activity (By similarity). Belongs to the XPG/RAD2 endonuclease family. EXO1 subfamily.