"It would be the height of irresponsibility to leave a digital backdoor wide open to our cyber adversaries," the president added.

The measure, known as the Cybersecurity Act of 2012, would create a public-private partnership that would set cybersecurity standards for critical infrastructure, such as water and power systems, and permit information-sharing between the private sector and the federal government.

The Republican-led House of Representatives passed a cybersecurity bill back in April that civil liberties advocates claimed would allow the federal government to obtain American's private information.

Obama said "out approach protects the privacy and civil liberties of the American people."

"Indeed I will veto any bill that lacks strong privacy and civil-liberties protections," the president said.