Microsoft has rushed out an emergency patch for a flaw that could be used in a worm attack.