Users should disable JavaScript in Adobe's Reader and Acrobat tools to protect themselves until a patch for a just-disclosed vulnerability is available, security experts said today.

The advice is timely, as noted bug researcher and exploit maker HD Moore confirmed that an exploit would be published to the open-source Metasploit penetration testing framework within a day or two.

Shadowserver, a volunteer-run group that tracks vulnerabilities, was the first to urge users to switch off JavaScript. "We have said it before and we will say it again: Disable JavaScript," the group said in a Monday post to its blog.

Although Shadowserver purposefully kept much of what it knew to itself, the group confirmed that JavaScript was involved. "We can tell you that this vulnerability is actually in a JavaScript function within Adobe Acrobat [and] Reader," Shadowserver claimed. "Furthermore, the vulnerable JavaScript is obfuscated inside a 'zlib' stream making universal detection and intrusion detection signatures much more difficult."

Moore, the creator of Metasploit and chief security officer for security company Rapid7, echoed Shadowserver's advice. "Disabling JavaScript does prevent the vulnerable code from being called," Moore said in an e-mail to Computerworld Tuesday.

To disable JavaScript in Adobe Reader or Acrobat on Windows, users must select Preferences from the Edit menu, choose "JavaScript," then uncheck the "Enable Acrobat JavaScript" option. (On the Mac, Preferences is under the "Adobe Reader" or "Adobe Acrobat" menus.)

Turning off JavaScript may be the only defense against attack until Adobe patches the problem. And it may be nearly a month before that happens: Adobe's next regularly-scheduled security updates for Reader/Acrobat are to ship Jan. 12, 2010.