Lawmakers approved amendments that would allow any worldwide media that receive financing from overseas to be classified as "foreign agents", a measure previously used only against NGOs.
"Any infringement on the freedom of Russian media overseas will not be left without a harsh answer", Peskov said.
"Any attempts to encroach on the freedom of Russian media overseas. will not remain without response from Moscow - without a very harsh response", Kremlin spokesman Dmitry Peskov told journalists.
Russian lawmakers have said that federal authorities would be responsible for determining which news outlets would be affected.
Likely targets are USA news organizations which receive government funding, including Voice of America and Radio Free Europe, as well as the privately-owned American television channel CNN.
The bill passed its second reading - also unanimously - earlier in the day.
"A hybrid war has been declared against us and we are obliged to respond", Communist Party leader Gennady Zyuganov said in parliament.
The amendments under consideration in Russia were proposed by lawmakers in the State Duma, the lower house of the Russian legislature.
Pyotr Tolstoy, a deputy speaker of the Duma who authored the bill, said he expects the Justice Ministry to take "pinpoint retaliatory measures".
The State Duma has passed an amendment, which allows the state to recognize foreign media receiving financing from overseas as "foreign agents" in third and final reading. Foreign media that do not register when requested can lose the right to work in Russian Federation.
Putin's spokesman Dmitry Peskov said the legislation will provide the necessary framework for the government to retaliate to any foreign action against the Russian media.
Amnesty International criticised the new bill as an attack on media freedom.
The law, which was passed in the wake of massive anti-Kremlin protests in Moscow, requests all groups that receive foreign funding and engage in vaguely defined political activities to register as foreign agents. They will also face a similar responsibility for such NGOs for breaching this legislation.
State Duma's decision came in response to the recent requirement from the US Department of Justice to register RT America TV channel, the American branch of the Russian television company, as a foreign agent.
Washington considers RT a propaganda arm of the Kremlin and told it to register its American operation under the Foreign Agents Registration Act aimed at lobbyists and lawyers representing foreign political interests.
Many US politicians accused the two Russian outlets of meddling in the 2016 US presidential election.