Is there an exceptional situation, where leaking classified military documents is not subject to criminal prosecution? I am wondering if everyone who leaks classified military documents are going to be charged criminally by the U.S. government in the U.S.
In New York Times Co. v. United States, 403 U.S. 713 (1971) (aka the Pentagon Papers case) The court specifically permitted public disclosure in national newspapers of information that had been officially classified. This was, of course a request for an injunction, not a criminal proceeding, but it is hard rto imagine that a criminal proceeding could have succeeded after the decision, and in fact no prosecution was attempted.
At the start of the unsigned opinion, the court wrote:
We granted certiorari in these cases in which the United States seeks to enjoin the New York Times and the Washington Post from publishing the contents of a classified study entitled "History of U.S. Decision-Making Process on Viet Nam Policy." (emphasis added)
This makes it clear that the content of the "papers" wa officially classified.
In concurrence, Justice Black (joined by Douglas) wrote:
I adhere to the view that the Government's case against the Washington Post should have been dismissed, and that the injunction against the New York Times should have been vacated without oral argument when the cases were first presented to this Court. I believe that every moment's continuance of the injunctions against these newspapers amounts to a flagrant, indefensible, and continuing violation of the First Amendment.
The question asks:
I am wondering if everyone who leaks classified military documents are going to be charged criminally by the U.S. government
Even when such charges are constitutionally permitted, the government has the authority not to proceed with them, if it so chooses, for whatever reason it sees fit.
18 USC § 793 prohibits conveying various information about the national defense, military equipment, or preparations for war:
with intent or reason to believe that the information is to be used to the injury of the United States, or to the advantage of any foreign nation
§ 793 does not refer to classification status at all, and it has no explicit excptions, but it would not apply where ther is no "intent or reason to believe" the information will harm the US or help another country.
18 USC § 794 has an intent requirement simialr to that of 793, but covers different kinds of information. Some of its provisions apply only in wartime, and then the required intent is that the information "will be communicated to the enemy". Again classification is not mentioned.
18 USC § 795 Covers making images of "vital military and naval installations or equipment" protected by order of the President. Permission of the relevant military commander is required. No exceptions are listed.
18 USC § 796 is similar to § 795 but limited to images obtained by use of aircraft. No exceptions are listed.
18 USC § 797 prohibits publication of images taken in violation of § 795, unless approved by a censor. It is in form a prior restraint. No exceptions are listed.
18 USC § 798 Prohibits disclosure of information about cryptographic systems. No exceptions are listed, but I think there is caselaw limiting the coverage of this section.
18 USC § 799 prohibits violation of NASA security regulations.