Apple customers have been warned that they may have been exposed to hackers “hiding in plain sight” on their Mac devices after a 15-year-old vulnerability was discovered by a cyber security researcher.

The exploit could allow a hacker to install malicious software on devices like MacBooks to access personal, financial and sensitive insider information by fooling security products into thinking it is safe.

This would enable hackers to circumvent antivirus protection by pretending to be Apple, using a technique called “code signing” and sit on the device for years without the owner knowing.

The flaw was found be researchers at San Francisco cloud security company Okta. Josh Pitts, the researcher who discovered the flaw, told the Telegraph: “When I found this, it really freaked me out because this is a way for someone to hide in plain sight for a long time”.

He said that it was not clear whether anyone had executed the attack yet, but that potentially millions of devices were left vulnerable. The flaw exists on devices running on current versions of macOS, Apple's computer operating system, and even old devices running Apple's OS X system.