There are many reasons that a contract can be void or voidable. Wikipedia will give you a good rundown. The reasons which apply to contracts generally will apply to NDAs specifically. This answer focuses on non-disclosure agreements.
Various legal authorities and courts have found contracts to be void in the following circumstances:
3. Public safety
4. Public Health
5. Matters of substantial public concern
The Model Penal Code prohibits what it calls compounding. The crime involves accepting payment in exchange for not reporting a crime.
Section 242.5. Compounding
A person commits a misdemeanor if he
accepts or agrees to accept any
pecuniary benefit in consideration of
refraining from reporting to law
enforcement authorities the commission
or suspected commission of any offense
or information relating to an offense.
It is an affirmative defense to
prosecution under this Section that
the pecuniary benefit did not exceed
an amount which the actor believed to
be due as restitution or
indemnification for harm caused by the
The Restatement (Third) of Unfair Competition recognizes a privilege to disclose trade secrets in certain circumstances like public health/safety and commission of a crime or tort.
Section 40, comment c:
The existence of a privilege to
disclose another's trade secret
depends upon the circumstances of the
particular case, including the nature
of the information, the purpose of the
disclosure, and the means by which the
actor acquired the information. A
privilege is likely to be recognized,
for example, in connection with the
disclosure of information that is
relevant to public health or safety,
or to the commission of a crime or
tort, or to other matters of
substantial public concern.
In Lachman v. Sperry-Sun Well Surveying Company, 457 F.2d 850 (10th Cir., 1972) the court cites the Restatement of Contracts, § 577
A bargain, performance of which would
tend to harm third persons by
deceiving them as to material facts,
or by defrauding them, or without
justification by other means is
A more recent case cited Lachman as authority to find "nondisclosure agreement not binding in respect to criminal activity."
Bartnicki v Vopper, 532 U.S. 514 (2001)
Fomby-Denson v. Dept of the Army, 247 F.3d 1366 (Fed. Cir., 2001) Is a case you could look at to see a review of some state courts which have "declined to enforce private agreements that barred the reporting or prosecution of possible crimes."