They more or less got the info from the US Government as by its own admission it "loss control" of the text as well as the actual code of the hacks.  Currently it is unclear as to whether it was an internal "leak" or one via one of the CIA's contract firms.