Mel Gibson is seriously considering suing Joe Eszterhas for secretly recording him at his home in Costa Rica last December, and then releasing the audio rant.
Sources connected with Mel tell TMZ ... the actor believes he has a "basic human right" NOT to be secretly recorded in his own home.
We're told Mel's people are looking at the laws of Costa Rica to determine if recording laws were violated and, even if they weren't, if Mel's right of privacy was violated by the release of the audio.
Mel explodes in the recording about Eszterhas' lack of progress with "The Maccabees" script -- "What the f**k have you been doing!!" He also unloads on Oksana Grigorieva, calling her a ""F**king c**t, c**ksucking whore."
We're told Mel believes anyone recorded "at their worst moment" would sound awful, and it's unfair to trap people in their refuge.
One Mel source notes with skepticism that Eszterhas has made other allegations against Mel ... that the actor also ranted against the Jews and expressed pleasure that John Lennon was shot and killed ... but none of that is on the tape.