The US Department of Homeland Security has warned that attackers are exploiting an unpatched flaw in Windows to compromise systems via malicious websites.

Microsoft on Friday said it was investigating reports of a newly discovered, unpatched bug in the XMLHTTP 4.0 ActiveX control, which it confirmed was being exploited on malicious sites. The bug has the potential to infect a large number of systems. Since it doesn't require any user interaction, a user must merely use Internet Explorer to visit a site containing the exploit.

Microsoft said it is determining whether the flaw requires an out-of-cycle patch. The company acknowledged that it could be used to spread malicious code via banner ads or via legitimate sites that have been compromised, as has happened in the past.

The ActiveX control in question is part of part of Microsoft XML Core Services, which is used to build XML-based web applications. All versions of Windows 2000, 2003 and XP are affected, according to Secunia, which gave the bug its most severe rating, "extremely critical". Because it isn't a browser flaw, the bug can be exploited via any version of Explorer, including the newly released, security-conscious IE 7. Windows Server 2003 users are less likely to be affected since that OS runs Explorer in a locked-down mode that disables ActiveX by default.

Microsoft didn't specify the flaw in XMLHTTP, but said it gives an attacker the same privileges as the logged-in user. Until a patch is available Microsoft said users can protect themselves by adjusting security restrictions or setting the kill-bit for the affected ActiveX control, among other workarounds.