Single-stranded structure-specific DNA endonuclease involved in DNA excision repair. Makes the 3'incision in DNA nucleotide excision repair (NER). Binds and bends DNA repair bubble substrate and breaks base stacking at the single-strand/double-strand DNA junction of the DNA bubble. Plays a role in base excision repair (BER) by promoting the binding of DNA glycosylase NTHL1 to its substrate and increasing NTHL1 catalytic activity that removes oxidized pyrimidines from DNA. Involved in transcription-coupled nucleotide excision repair (TCR) which allows RNA polymerase II-blocking lesions to be rapidly removed from the transcribed strand of active genes. Functions during the initial step of TCR in cooperation with ERCC6/CSB to recognized stalled RNA polymerase II. Also, stimulates ERCC6/CSB binding to the DNA repair bubble and ERCC6/CSB ATPase activity. Required for DNA replication fork maintenance and preservation of genomic stability. Involved in homologous recombination repair (HRR) induced by DNA replication stress by recruiting RAD51, BRCA2, and PALB2 to the damaged DNA site. During HRR, binds to the replication fork with high specificity and stabilizes it. Also, acts upstream of HRR, to promote the release of BRCA1 from DNA. 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. Monomer. Homodimer. Component of the homologous recombination repair (HR) complex composed of ERCC5/XPG, BRCA2, PALB2, DSS1 and RAD51. Within the complex, interacts with BRCA2 and PALB2. Interacts with RNA polymerase II. Interacts (via C-terminus) with ERCC6/CSB; the interaction stimulates ERCC6/CSB binding to the DNA repair bubble and ERCC6/CSB ATPase activity. May form a complex composed of RNA polymerase II, ERCC6/CSB and ERCC5/XPG which associates with the DNA repair bubble during transcription-coupled nucleotide excision repair. Interacts with BRCA1; the interaction promotes the release of BRCA1 from DNA. Interacts with PCNA. Interacts with NTHL1; the interaction stimulates NTHL1 activity and NTHL1 binding to its DNA substrate. Colocalizes with RAD51 to nuclear foci in S phase. Localizes to DNA double-strand breaks (DBS) during replication stress. Colocalizes with BRCA2 to nuclear foci following DNA replication stress. Both nuclear localization signals 1 and 2 act as a monopartite signal which binds to the high affinity site on KPNA2/importin-alpha. Both the spacer region (also known as the recognition (R) domain) and C-terminal domain are required for stable binding to the DNA repair bubble. However, both domains are dispensable for incision of DNA bubble structures. Belongs to the XPG/RAD2 endonuclease family. XPG subfamily.