18 U.S.C. 793, 794, and 798 make for interesting reading. The potential hot water the NY Times finds itself in has two dimensions: 1) Did they solicit the information and 2) What was their intent when they published it.
E.O. 13292 (which replaced the oh so ironic E.O. 12958) is also good for general background.