WASHINGTON — President Trump lashed out at the nation’s intelligence agencies on Wednesday, accusing them of being “passive and naive” about the dangers posed by Iran, and defending his handling of Afghanistan, North Korea and the Islamic State.

A day after the agencies issued their annual assessment of global threats — warning of malefactors like China and the Islamic State — Mr. Trump reignited a long-simmering feud with his own government, reacting as if the report was a threat to him personally.

“Perhaps Intelligence should go back to school!” he declared on Twitter in an indignant early morning post. In another, Mr. Trump said, “The Intelligence people seem to be extremely passive and naive when it comes to the dangers of Iran. They are wrong!”

Normally, the “Worldwide Threat Assessment” is an annual bureaucratic exercise, a dispassionate survey of the threats facing the United States — some longstanding, some new — that the White House accepts without much comment.