David frequently impersonated Mr Sanders, a former presidential hopeful, on Saturday Night Live during the 2016 Democratic Party presidential primaries.
Now, the US TV show Finding Your Roots has discovered the two are distant cousins.
Scientific tests on their DNA showed long chains of matching molecules, revealing that they are third or fourth cousins.
Presented with an album collating his family history, Mr Sanders laughed and clapped his hands on opening the first page to see a photo of David staring back at him.
“Unbelievable” said the Vermont senator.
“He does a better Bernie Sanders than I do!”
On hearing the news, David, the star of TV show Curb Your Enthusiasm, said: “What the hell! That is so funny, that’s amazing. Cousin Bernie.”
Both men are in their 70s and were born in Brooklyn. They also share more than a passing resemblance.
David also discovered that he had Alabama ancestors who fought for the Confederacy in the Civil War.
Mr Sanders eventually lost the primaries to Hillary Clinton, who then stood for election against Donald Trump.