A gaping security hole in Macromedia Inc.'s Flash Player could put millions of Web surfers at risk of PC hijack attacks, the company warned in an advisory.

The vulnerability, which was privately reported to Macromedia four months ago, is rated "critical" and could lead to arbitrary code execution attacks.

The flaw was flagged in Macromedia Flash Player 7.0.19.0 and earlier versions.

"Users who have already upgraded to Flash Player 8 are not affected by this issue. Macromedia recommends all Flash Player 7 and earlier users upgrade to this new version," the company said.

According to eEye Digital Security, the private research firm that reported the issue to Macromedia, the bug affects Macromedia Flash 6 and Flash 7, both on all Windows platforms.

eEye said the vulnerability opens the door for a malicious hacker to run arbitrary code in the context of the logged-in user.

"An array boundary condition may be violated by a malicious .SWF file in order to redirect execution into attacker-supplied data," the company said.

The .SWF (Small Web Format) extension is used to play Flash "movies" over the Internet.

eEye said the vulnerable code exists in Flash.ocx, which embodies the code responsible for playing back .SWF files.

"One function maintains a large, 256-element table of function pointers on the stack, and uses a frame-type identifier read from the SWF file as an index into the array, without enforcing the array boundaries."

"Reliable exploitation using this technique within [Microsoft Corp.'s] Internet Explorer has been demonstrated," eEye's alert said.

Stephen Toulouse, a program manager in the MSRC (Microsoft Security Response Center), has posted a blog entry to raise the alarm for IE users to update to the patched Flash Player.

Toulouse confirmed that the Macromedia Flash Player is a third-party product that ships with Windows XP Service Pack 1 and 2.

"If you aren't using Macromedia Flash Player, or know that you don't need it, you can disable the ActiveX control in Internet Explorer through the "Manage Add-ons" option under the Programs entry on the Tools menu," Toulouse said.

The vulnerable Flash player also ships with the Opera Web browser.

Macromedia has posted fixes to its Download Center.

Windows users can determine which version of the Flash player is installed at this Web page.

Check out eWEEK.com's Security Center for the latest security news, reviews and analysis. And for insights on security coverage around the Web, take a look at eWEEK.com Security Center Editor Larry Seltzer's Weblog.

Copyright © 2005 Ziff Davis Media Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Media Inc. is prohibited.