A flaw in the way Microsoft's Internet Explorer (IE) browser processes FTP commands could let attackers steal or erase data from a victim's FTP site.

The bug, which affects users of IE6 and the unsupported IE5 browser, gives an attacker a way of hijacking the victim's FTP sessions. But a successful attack would be very hard to pull off and would only work in very precise and targeted attacks, security experts said.

The attacker would need to know the victim's user name on the FTP server and the victim would have to already be logged into the server, using IE. Under those conditions, the victim could be sent a malicious FTP link that would then execute commands on the victim's FTP server.

This link could be sent to the browser via an invisible iFrame component, hidden on a malicious website, so the victim might not even know the attack was taking place.

"It's something that people could use to steal data, but you'd have to know your target," said Derek Abdine, the principal software engineer with security vendor Rapid7, who unveiled the issue in a security advisory.

"The attack seems viable, but the stars have to be aligned just right for the attack to work," said Craig Schmugar, a researcher with McAfee's Avert Labs. "An administrator would need to be authenticated already or the server would need to be configured with weak credentials."

Rapid7 notified Microsoft of the issue in January. A month later, after the software giant had not patched the issue, it decided to publish proof-of-concept code to illustrate the flaw.

The flaw is "almost exactly the same" as another another IE FTP flaw that Microsoft patched in August 2006, Abdine said. Microsoft fixed that bug with its MS06-042 patch, issued in August 2006.

The MS06-042 update fixed many IE vulnerabilities, but it ended up embarrassing Microsoft. That's because the security patch had a flaw of its own, a critical security vulnerability that sent Microsoft's security team scrambling to re-issue the update.

The FTP problem does not affect IE7, Microsoft has countered. It said it has not heard of any attacks that take advantage of this vulnerability and has determined that any successful attack would only lead to the unauthorised disclosure of data.