Obama: We have long known about 'significant vulnerabilities'

The U.S. government has long known about its cybersecurity vulnerabilities, and the problem is only getting worse, President Barack Obama said Monday.

"We have known for a long time that there are significant vulnerabilities, and that these vulnerabilities are going to accelerate as time goes by, both in systems within government and within the private sector," Obama said at news conference from the Group of Seven summit in Germany.

Obama declined to say who the U.S. thinks is responsible for a massive hack attack that exposed the data of about 4 million current and former federal employees. Several media reports have indicated, however, that investigators believe Chinese hackers are to blame.

Read MoreUp to 4 million exposed in deep federal data breach

The president emphasized the escalating digital threats mean Congress should move ahead with passing cybersecurity legislation.

Part of the U.S. problem is that the country has "very old systems," he said, adding that the recent breach was discovered because of efforts to install newer and better systems.

"Both state and non-state actors are sending everything they've got at trying to breach these systems," he said. "And this problem is not going to go away—it is going to accelerate."

Turning to international issues, Obama said Russian troops continue to operate in Ukraine, but the U.S. and its allies remain committed to continuing sanctions against Moscow.

Noting that it is the second year in a row that the group has met without Russian representation, the president noted sanctions' effects against Russia: a weakened economy in "deep recession," and struggling financial and energy sectors.

Read MoreNo place for Putin at G7: Canadian PM

Obama said the G7 is willing to continue its sanctions against Moscow, including Europe extending its sectoral sanctions beyond July. More sanctions could even be on their way, he added.

"There was discussion about additional steps that we might need to take if Russia, working through separatists, doubled down on aggression inside of Ukraine," Obama said, adding that "those discussions are taking place at a technical level, not yet at a political level."

Turning to economic considerations, the president shot down a report that he had been talking down the U.S. dollar in private meetings.

"Don't believe unnamed quotes," he said. "I did not say that, and I make a practice of not commenting on the daily fluctuations of the dollar or any other currency."

President Barack Obama speaks during a press conference at the G7 Summit at the Schloss Elmau castle resort near Garmisch-Partenkirchen, in southern Germany on June 8, 2015.
Mandel Ngan | AFP | Getty Images
President Barack Obama speaks during a press conference at the G7 Summit at the Schloss Elmau castle resort near Garmisch-Partenkirchen, in southern Germany on June 8, 2015.

On an international level, the global economy, he said, is "not performing at its full potential."

Obama also discussed one of Europe's chief concerns: He admitted that there is "a sense of urgency" in finding a way to resolve the situation with Greece, but that the road ahead will be challenging.

"What it's going to require is Greece being serious about making some important reforms, not only to satisfy creditors, but more importantly to create a platform whereby the Greek economy can start growing again and prosper," he said, adding that Athens will need to "make some tough political choices."

Read MoreG7 Bavaria summit: What's on the agenda?

Obama was huddling with allies on the sidelines of an international summit to address pressing Mideast problems.

He's also trying to convince European leaders not to waver on sanctions against Russia in the face of fresh violence in Ukraine.

Obama is attending Monday's final day of the G-7 summit under the strain of an intimidating list of global pressures, with little signs of movement to address them among the world's largest industrial democracies.

Obama plans to meet with French President Francois Hollande—a sometimes skeptical partner in the talks with Iran over its nuclear weapons program.

The president also plans to consult Iraqi Prime Minister Haider al-Abadi as he struggles against an increasing threat from the Islamic State.

—The Associated Press contributed to this report.