The Guardian has shown "extraordinary naivety and arrogance" over the publication of articles based on NSA documents leaked by the US whistleblower Edward Snowden, the former foreign secretary Jack Straw has said.

Straw, who was foreign secretary at the time of the Iraq war in 2003, said the Guardian was wrong to assume that it could judge whether details from the files would pose a threat to anyone's security. The Guardian has said that it is taking care not to publish documents that would threaten national security or the security of individuals.

The former foreign secretary told the BBC: "I'm not suggesting for a moment anybody in the Guardian gratuitously wants to risk anybody's life. But what I do think is that their sense of power of having these secrets and excitement – almost adolescent excitement – about these secrets has gone to their head.

"They're blinding themselves about the consequence and also showing an extraordinary naivety and arrogance in implying that they are in a position to judge whether or not particular secrets which they have published are not likely to damage the national interest, and they're not in any position at all to do that."

The remarks by Straw reflect the claim by Oliver Robbins, the cabinet office's deputy national security adviser, that apparently innocuous information in the leaked files could be helpful to terrorists. David Cameron said on Thursday that the Guardian has "on some occasions" acknowledged the sensitivity of the material it holds.