The CIA has been building a database of international money transfers that includes the financial information of millions of Americans, according to the New York Times and the Wall Street Journal.

A majority of the records are foreign. Most records include personal information like Social Security numbers, easily allowing transactions to be tied to a specific person.

The bulk data collection is allowed under section 215 of The Patriot Act, the same provision that sanctions the National Security Agency’s spy program.

The program was inspired by the 9/11 attacks, when al Qaeda was able to quietly move $300,000 to U.S. bank accounts.