Philosopher and blogger Massimo Pigliucci discusses this intriguing issue in his essay on a recent talk covering the ethics of humor by his colleague at CUNY’s Graduate Center, philosopher Noël Carroll:

Carroll brought up an interesting point in this respect: some malicious jokes are indeed funny, if ethically objectionable. Is one therefore morally complicit if he laughs at one of these jokes? It depends on which theory of humor you subscribe to. Understanding and laughing at a joke obviously requires a certain cultural background on the part of the listener, and according to the attitude-endorsement theory, if said listener is laughing at racist or misogynist jokes, he must be at least somewhat racist or misogynist himself.

Read more of Pigliucci on theories of humor here.