There is a word for this in Indonesian language: jayus.
(Maybe, it is used in Filipino and Malaysian language also.)
It is a joke that is so bad, it's funny. It is often mentioned as untranslatable. I wonder if there is any English equivalent though. (and yes, English does not have to have a word for everything but there is always a chance or we can find a close match at least.)
Lame joke is mentioned in some of the sources but it does not quite fit. Here is an explanation:
Some argue that “lame joke” would do just fine, but not all lame jokes can make one laugh. A joke becomes a jayus when those who heard it laughed, not at the joke but at the person’s failed attempt to deliver a punch line.
Source: ~