(Updates prices, changes comment)
* Worries over cyber attack result in stock buying
* Commodity-linked currencies rise
* S&P 500 hits record high
By Rodrigo Campos
NEW YORK, May 15 (Reuters) - Commodity-linked stocks and currencies got a lift on Monday from rising crude oil prices after major producers Saudi Arabia and Russia said they would extend oil supply cuts into 2018.
Cyber-security shares also got a lift, after a hack that locked down hundreds of thousands of computers across 150 countries over the weekend.
Energy ministers from the world's top two oil producers said production cuts, which were set to expire next month, should continue until March, longer than an optional six-month extension specified in the deal.
"It's more jawboning from OPEC, and I think in the end it's going to prove to be noise... so the rally is probably a little much," said Michael O’Rourke, chief market strategist at JonesTrading in Greenwich, Connecticut.
"But the market is reacting to the headlines."
The Organization of the Petroleum Exporting Countries meets in Vienna on May 25 to consider the extension.
U.S. crude rose 2.09 percent to $48.84 per barrel and Brent was last at $51.82, up 1.93 percent on the day.
The news from the energy sector more than offset concern over the weekend after a successful missile test by North Korea and a cyber attack with unprecedented global reach.
The global "ransomware" cyber attack disrupted factories, hospitals, shops and schools, and spurred investors on Monday to buy stocks set to benefit from higher cyber security spending by firms and government agencies.
An exchange-traded fund of cyber security shares across the globe hit a near two-year high and was last up 3.2 percent at $30.71.
U.S. cyber stocks jumped, and the largest advancing sector on Wall Street was technology, with Cisco leading the way up on the S&P 500, which hit a record high.
The Dow Jones Industrial Average rose 81.2 points, or 0.39 percent, to 20,977.81, the S&P 500 gained 10.35 points, or 0.43 percent, to 2,401.25 and the Nasdaq Composite added 24.19 points, or 0.4 percent, to 6,145.42.
The pan-European FTSEurofirst 300 index rose 0.10 percent and MSCI's gauge of stocks across the globe gained 0.46 percent.
Emerging market stocks rose 0.91 percent. MSCI's broadest index of Asia-Pacific shares outside Japan closed 0.68 percent higher, while Japan's Nikkei lost 0.07 percent.
The currencies of resource-linked economies got a boost from the jump in oil prices. The Canadian dollar hit its highest level in over two weeks against the greenback.
The U.S. dollar was also hurt by weak data on New York state area manufacturing.
The dollar index, tracking the currency against a basket of other major units, fell 0.34 percent, with the euro up 0.46 percent to $1.0978.
The Japanese yen weakened 0.37 percent versus the greenback at 113.77 per dollar, while sterling was last trading at $1.2896, up 0.05 percent on the day.
The Canadian dollar strengthened 0.48 percent versus the greenback at 1.36 per dollar.
U.S. Treasury yields slipped after the weak U.S. data.
Benchmark 10-year notes last fell 3/32 in price to yield 2.3415 percent, from 2.333 percent late on Friday.
Spot gold added 0.2 percent to $1,230.61 an ounce. U.S. gold futures gained 0.25 percent to $1,230.80 an ounce.
Copper rose 0.96 percent to $5,613.00 a tonne.
Additional reporting by Caroline Valetkevitch, Jessica Resnick-Ault, Dion Rabouin and Karen Brettell in New York; Editing by Bernadette Baum