(CNN) The personal Gmail accounts of an unspecified number of US senators and Senate staff have been targeted by foreign government hackers, a Google spokesperson confirmed to CNN on Thursday.

On Wednesday, Sen. Ron Wyden, an Oregon Democrat, wrote in a letter to Senate leadership that his office had learned that "at least one major technology company has informed a number of Senators and Senate staff members that their personal email accounts were targeted by foreign government hackers."

Google confirmed it was the company Wyden was referring to, but would not say which senators were targeted or when the attempted intrusions were detected.

The senators and their staff targeted were both Republicans and Democrats, a Senate aide told CNN.

Google would not say whether the targeting had resulted in a successful hack but pointed to a blog post on its website about its government-backed hacking warnings that says, "We send these out of an abundance of caution -- the notice does not necessarily mean that the account has been compromised or that there is a widespread attack. Rather, the notice reflects our assessment that a government-backed attacker has likely attempted to access the user's account or computer through phishing or malware, for example."

Read More