* Oil prices hit a more than three-week high
* Cisco provides biggest boost to Nasdaq, S&P
* Patheon soars after Thermo Fisher's $5.2 bln deal
* Indexes up: Dow 0.39 pct, S&P 0.42 pct, Nasdaq 0.35 pct (Updates to early afternoon)
By Tanya Agrawal
May 15 (Reuters) - The Nasdaq Composite and the S&P 500 were trading at record levels in early afternoon trading on Monday as a rise in oil prices boosted energy stocks and investors shrugged off the impact of a global cyber attack.
Oil hit its highest in more than three weeks after top exporters Saudi Arabia and Russia said supply cuts needed to last into 2018, a step towards extending an OPEC-led deal to support prices for longer than originally agreed.
Shares of oil majors Exxon and Chevron helped boost the S&P energy index, which was on track to close higher for the first time in three sessions.
"The rebound in oil prices and lack of bad news on the geopolitical front have led to a bit of a relief rally in equities," said Randy Frederick, vice president of trading and derivatives for Charles Schwab in Austin, Texas.
"At this level, there isn't too big a correlation between oil and equities but since we've seen oil fall quite a bit in a month or so, today's rally in oil is helping the market grind higher."
At 13:00 p.m. ET (1700 GMT) the Dow Jones Industrial Average was up 81.69 points, or 0.39 percent, at 20,978.3.
The S&P 500 was up 10.12 points, or 0.42 percent, at 2,401.02 and the Nasdaq Composite was up 21.12 points, or 0.35 percent, at 6,142.35.
Ten of the 11 major S&P 500 sectors were higher, with the energy and materials index leading the gainers.
The telecommunications index was the lone laggard, down 0.25 percent.
Investors seemed to mostly shrug off fears from a successful missile test by North Korea and a global cyberattack that disrupted operations at car factories, hospitals, shops and schools.
"Don't cry until you're hurt and apparently we're not hurt. The North Korean thing had been anticipated and the cyber attacks are now the modern cost of doing business," said Kim Forrest, senior equity research analyst at Fort Pitt Capital Group in Pittsburg.
Shares of cybersecurity firms such as Fireye, Symantec and Palo Alto Networks were all up.
Cisco's 2.9 percent rise provided the biggest boost to the Nasdaq and S&P.
Tesla was down 2.5 percent at $316.67 after Morgan Stanley downgraded the electric-car maker's stock.
Patheon NV soared 33.2 percent to $34.64 after Thermo Fisher Scientific said it would buy the Dutch drug ingredients maker for about $5.2 billion.
Advancing issues outnumbered decliners on the NYSE by 2,272 to 564. On the Nasdaq, 1,963 issues rose and 827 fell.
The S&P 500 index showed 43 new 52-week highs and eight new lows, while the Nasdaq recorded 127 new highs and 34 new lows. (Reporting by Tanya Agrawal; Editing by Saumyadeb Chakrabarty and Sriraj Kalluvila)