China systematically dismantled CIA spying efforts in the country from 2010, killing or jailing more than a dozen covert sources, in a deep setback to US intelligence there, according to a report by The New York Times.

The Times, quoting 10 current and former US officials who spoke on condition of anonymity, described the intelligence breach as one of the worst in decades.

The report, released on Sunday, said that even now intelligence officials were unsure whether the US was betrayed by a mole within the CIA or whether the Chinese hacked a covert system used by the agency to communicate with foreign sources.

Of the damage inflicted on what had been one of the most productive US spy networks, there was no doubt that at least a dozen CIA sources were killed between late 2010 and the end of 2012, it said.

"One was shot in front of his colleagues in the courtyard of a government building - a message to others who might have been working for the CIA," the report said.

In all, 18 to 20 CIA sources in China were either killed or imprisoned, according to two former senior American officials quoted.

The breach was considered particularly damaging, with the number of assets lost rivalling those in the Soviet Union and Russia who perished after information passed to Moscow by spies Aldrich Ames and Robert Hanssen, the report said.

The CIA's mole hunt in China, following the severe losses to its network there, was intense and urgent. Nearly every employee of the US Embassy in Beijing was scrutinised at one point, the newspaper said.

The Chinese activities began to emerge in 2010, when the American spy agency had been getting high-quality information about the Chinese government from sources deep inside the bureaucracy, including Chinese upset by the Beijing government's corruption, four former officials told the Times.

The information began to dry up by the end of the year and the sources began disappearing in early 2011, the report said.

As more sources were killed, the FBI and the CIA began a joint investigation of the breach, examining all operations run in Beijing and every employee of the US Embassy there.

The CIA declined to comment.