Turns out David Letterman doesn't just live on a TV show. He also lives in a glass house, where for years he's hurled comedy zingers at misbehaving politicians, even as he brashly engaged in hanky-panky of his own.

In March 2008, Letterman was taking potshots at Eliot Spitzer, then governor of New York, who was embroiled in an investigation into a high-end prostitution ring.

"It's so sunny and bright outside that, earlier today, Eliot Spitzer came out of a brothel squinting," Letterman cracked in a monologue.

SLIDESHOW: David Letterman's History of Woman Trouble.

But in Spitzer's case, he didn't stop at lampooning. During an indignant rant, he called for the scandalized governor to step down.

"I mean, can you imagine," said Letterman, "if this happened to me how fast they'd have my ... (backside) out of here?"

Unlike Spitzer, who resigned, Letterman seems secure in his job as host of CBS' "Late Show," nearly a week after his bombshell revelations of having had sex with women on his staff (a disclosure prompted by an alleged $2 million blackmail threat against him).

SLIDESHOW: Celebrity Affairs Exposed.

But in light of his acknowledging past "creepy" behavior, it's kind of creepy to revisit a joke such as this one from a March 2008 show: "Let me ask you a question. Do you think it's too soon to be hitting on Mrs. Eliot Spitzer?"

In another monologue, Letterman had tweaked Sen. David Vitter, a Louisiana Republican whose telephone number was found in 2007 among those called by an escort service that prosecutors said was a prostitution ring.

Vitter "admitted he's been dating prostitutes," said Letterman. "And he was very generous with one girl: He paid her with a new highway project in her home state."

Perhaps Vitter, like many other embarrassed politicians, had set himself up for ridicule. But hasn't Letterman set himself up for payback, now?

Vitter chose not to return fire at Letterman's glass house. When asked by The Associated Press for comment, Vitter's office declined.

So did former U.S. Sen. Gary Hart, whose run for the presidency was derailed by a sex scandal in 1987 and who became the butt of many of Letterman's jokes.

"Big weekend for Gary Hart," cracked Letterman when the Hart scandal broke: "He was campaigning his brains out."

Chris Smith, Hart's spokeswoman at the University of Colorado Denver School of Public Affairs, said Hart had no comment.

Most of the targets of Letterman's jokes approached by the AP chose not to weigh in on the current woes of the talk-show host. But South Carolina Gov. Mark Sanford offered Letterman his best wishes.

"Both my thoughts and my prayers are with him," Sanford said Tuesday after a speaking engagement at a Rotary Club meeting in Easley, S.C.

In June, Sanford seemed fair game for comedy after he disappeared from the state (and his wife) for a five-day rendezvous with an Argentine woman he called his soul mate.

Sanford "didn't really enjoy this year's Fourth of July. He left his favorite firecracker in Argentina," Letterman joked soon after.

"There's a lot more introspection and soul-searching on the way down than there is on the way up," said Sanford, who is under investigation by South Carolina's Ethics Commission, in addressing his dilemma as well as Letterman's. "He can be a better person for it."

Letterman has made comic hay of the troubles of Larry Craig, a former U.S. senator from Idaho who in 2007 was arrested by an undercover police officer conducting a sting operation against men cruising for sex at the Minneapolis-St. Paul International Airport.

Noting that Craig was arrested in an airport men's room, Letterman said, it "gives new meaning to the word 'caucusing."'

Both during and after his White House years, President Bill Clinton remained a reliable source of Letterman's humor.

Another favorite target: former Alaska Gov. Sarah Palin, with whom Letterman had a run-in over sexually suggestive jokes made at the expense of her teenage daughter in June.

In July 2008, Letterman turned his sights on former presidential candidate John Edwards, who confessed to an extramarital affair. No. 1 on Letterman's "Top Ten Signs Barack Obama Is Overconfident": "Been cruising for chicks with John Edwards."

Letterman, like many other comedians, took glee in the disgrace of Mark Foley in 2006, after a scandal involving salacious e-mails that were sent by him to underage teens ruined his political career.

"How about that Florida Congressman Mark Foley?" cracked Letterman at the time. "Whoa! At least the Democrats wait until the interns are 18."

Foley is now a talk-radio host in Florida.

"I feel sorry for Dave, I take no glee," Foley said Tuesday.

He voiced concern for Letterman's 5-year-old son, Harry, and for the child's mother, Regina Lasko, whom Letterman married in March after many years together.

"Nobody is above making tragic mistakes. Some never get discovered; some do, in a very public way," said Foley, adding pointedly that Letterman "can keep apologizing until the cows come home. But he's now found his own life the subject of late-night comedians."