But note the "attacker" may have committed an illegal action or at least violated contract law...
You are correct... "The Attacker" violated contract law as the courts interpret it... And would be convicted of a hack because "code vulnerability doesn't equal consent".