Mac users have been advised to install a patch after Apple warned of a serious flaw in Mac OS X.