If the head of the CIA stepped foot in Iran, you bet your butt that they'd be at serious risk of arrest. The only reason this wouldn't be the case is Iran not having Nukes.
How one country having "nukes" makes something more or less legal? I don't see the connection here. Crime is a crime no matter what is the nationality and position of a person. If critisizing Communist Party is a crime, it doesn't matter who commits it, everybody should be treated equally.
> Crime is a crime no matter what is the nationality and position of a person
Iran apprehending an American official crosses from criminality and law into the anarchy of geopolitics.
For example, the fact that we have nukes is probably one among many considerations a foreign power might weigh when thinking about kidnapping the President.