A person duly and in good faith subpoenaed or ordered to attend, for the purpose of being examined, in a case where his attendance may lawfully be enforced by attachment or by commitment, is privileged from arrest in a civil action or special proceeding, while going to, remaining at, and returning from, the place where he is required to attend. An arrest, made contrary to the provisions of this section, is absolutely void and is a contempt of the court, if any, from which the subpoena was issued, or by which the witness was directed to attend.
N.Y. Civ. RightsLaw § 25