Why China, Russia care if you cheated

When Americans cheat on their spouses, China and Russia may want to know.

The countries' intelligence services are gathering data from recent cyberattacks to possibly target government workers for information, CNN reported Wednesday, citing a U.S. official. China and Russia are using a database of information obtained in breaches ranging from the U.S. Office of Personnel Management to cheating website Ashley Madison to potentially compromise U.S. officials, according to the report.

Bill Hinton | Mobile Minute | Getty Images

The FBI, OPM and Ashley Madison owner Avid Life Media declined to comment to CNBC.

Read MoreA new cold war the US may find difficult to master

The official told CNN that China and Russia use hackers or private companies to breach U.S. systems, attempting to cover their tracks in the process. The White House has previously acknowledged the threat of cyberattacks and outlined efforts to prevent them.

Many government systems remain vulnerable to more attacks, the source told CNN.

Read MoreAshley Madison hacked, user data leaked

Read the full CNN report here.