SRD said:You must succeed on an Intelligence check against this DC to avoid a decrease in Intelligence and Charisma. If the check fails,your Intelligence and Charisma scores each fall to 8 for the stated duration,and you become unable to cast arcane spells.
This seems to be a pretty steep penalty for a spell that still leaves a chance for a wrong answer.
I was wondering if a Restoration spell could reverse this decrease, but I suspect the answer is no. The text of the spell never says it's ability score damage, just that if you fail your roll your scores "each fall to 8". But then again...
SRD said:Greater restoration also dispels all magical effects penalizing the creature ’s abilities
It is a magical effect, and it does penalize the casters' stats. Lesser and regular Restoration wouldn't fly, but could Greater Restoration reverse the penalties for failing your int roll when casting Contact Other Plane?