(CNN) How did Larry David deliver a spot-on impression of Bernie Sanders on "Saturday Night Live"? Apparently it's in his DNA.

In an upcoming episode of "Finding Your Roots," a PBS program in which celebrities find out more about their lineage and history, David will learn he has genealogical ties to the senator and former presidential candidate, who he channeled for numerous appearances on "SNL" during the election.

David spoke about the surprising discovery on Wednesday during a panel for the return of "Curb Your Enthusiasm." during the Television Critics Association press tour after a reporter, who'd seen an advance screener of the "Finding Your Roots" episode, posed a question about it.

David said he'd been instructed to keep the connection a secret, presumably because the network wanted to promote or tease the reveal.

David said he was "very happy" to learn about his connection to the Vermont senator.

Read More