A firewall used by the CIA to communicate with its spies in China compromised their identities and contributed to their executions by the Chinese government, several current and former intelligence officials told Foreign Policy magazine in a report published Wednesday.

In a two-year period starting in 2010, Chinese officials began accurately identifying spies working for the US.

The Chinese set up a task force to break in to the throwaway system, Foreign Policy said, but it was unclear how they ultimately identified people.

About 30 spies were reportedly executed, though some intelligence officials told Foreign Policy that 30 was a low estimate.

The last CIA case officer to meet with sources in China reportedly handed over large amounts of cash in hopes that it would help them escape, Foreign Policy said.