Single-stranded DNA endonuclease involved in excision repair of DNA damaged with UV light, bulky adducts, or cross-linking agents. Essential for the incision step of excision-repair (Probable). 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. XPG subfamily.