One in five job applications to the Central Intelligence Agency that were flagged for extra scrutiny had "significant" links to terrorism, according to a report published in the Washington Post.
The data was part of a classified CIA budget released by former National Security Agency contractor Edward Snowden.
Thousands of applications — amounting to roughly one fifth of those flagged — had "significant terrorist and/or hostile intelligence connections" with groups including Hamas, Hezbollah, al Qaeda and its affiliates.
The classified budget did not specify the nature of the connections.
"Over the last several years, a small subset of CIA’s total job applicants were flagged due to various problems or issues,” one official told the Post on condition of anonymity in order to discuss classified information.
“During this period, one in five of that small subset were found to have significant connections to hostile intelligence services and or terrorist groups," the official said.
More from GlobalPost: NSA 'spied' on emails of Brazil and Mexico presidents, report says
The revelation underscores the enormity of the risk facing US intelligence agencies.
The US intelligence community is made up of 16 spy agencies and has 107,035 employees.
In 2011, Congress ordered Director of National Intelligence James R. Clapper Jr. to set up "an effective automated insider threat detection program" but the program has been hit by snags and delays.
Budget documents show the project was thrown off course after the fallout from the major leak by Army Pfc Bradley Manning.
Manning, who now goes by Chelsea Manning, was sentenced to 35 years in prison in August for releasing classified documents to online anti-secrecy website WikiLeaks.
A prosecutor in Manning’s case said that despite the risks, the US government has no choice but to entrust its secrets to its employees — even low-level ones.
"Military intelligence professionals go to work every day and use the information available to them to do their jobs," said prosecutor Capt. Joe Morrow.
"We can take all the mitigation steps in the world, but the bottom line is that there is no step we can take as a nation, as a military, that’s going to stop the determined insider."