Apple has recently revealed a serious security flaw affecting its devices , enabling the execution of malicious code remotely via web-based JavaScript.