Security experts have found a vulnerability in Windows that could allow malware to lurk undetected in long string names of the Windows Registry.

The weakness is caused by an error in the Windows Registry Editor Utility's handling of long string names. A malicious program could hide itself in a registry key by creating a string with a long name, which would allow the malicious string and any created after it in the same key to remain hidden. Keys are stored in the Windows Registry, which saves a PC's configuration settings.

Secunia has confirmed that the vulnerability affects the "Run" registry key, according to itsadvisory. Malicious strings in this key will be executed when a user logs in to the PC.

The vulnerability affects Windows XP and Windows 2000 and has been confirmed to exist on fully updated XP systems with Service Pack 2 and Windows 2000 systems with Service Pack 4.

Microsoft issued a statement on the vulnerability saying it is investigating the weakness and is not aware of any malicious attacks that have exploited it.

Moreover, the company asserted that the vulnerability by itself could not allow an attacker to remotely or locally attack a user's computer. It could only be exploited if the computer had its security compromised in some other way or was already running malicious software.

In its advisory, Secunia provided several solutions to avoid exploitation of the vulnerability, one of which is to ensure that systems have up-to-date anti-virus and spyware detection software installed.

The security company also said it is possible to see the hidden registry strings with the "reg" command-line utility of the Windows Registry, and that the "regedt32.exe" utility on Windows 2000 is not affected by the weakness.