Apple has revealed its latest update fixes a bug that let hackers take over its products simply by displaying a picture.

Known as the CoreGraphic bug, it was discovered by security researcher Marco Grassi.

It allowed hackers to create a jpeg file that used a memory bug to run code on the user's phone whenever it displayed a hacked picture.

Scroll down for video

Known as the CoreGraphic bug, it was discovered by security researcher Marco Grassi, and allows hackers to create a jpeg file that used a memory bug to run code on the user's phone.

HOW TO UPDATE NOW You can make sure that you aren't at risk by updating your iOS device to iOS 10.1 as soon as possible. To update, select Settings / General/ Software update To update your watch, select the watch app , then geneal / software update Advertisement

Apple confirmed the fix was available in the iOS 10.1 for iPhone 5 and later, iPad 4th generation and later and the iPod touch 6th generation and later.

It also released updates for the Apple watchOS , macOS and tvOS addressing the same issue.

'A memory corruption issue was addressed through improved memory handling,' it said of its support site, warning the hack meant 'Viewing a maliciously crafted JPEG file may lead to arbitrary code execution.'

Security researcher Micah Lee first spotted the update, tweeting 'Upgrade to iOS 10.1 right now.

'It fixes a remote code execution vulnerability that's exploited by getting you to open a malicious JPEG.'

Security expert Graham Cluley explained 'In simpler language, if you view a maliciously-crafted JPEG graphic (for instance, by browsing a website or opening an email) on a vulnerable iOS device, you could be allowing malicious code to execute.

'That's a nasty security bug, and now Apple has released a patch there will be surely be some criminal hackers who are interested in seeing if they can find a way of exploiting it.'

Michael Horowitz, from Chicago, checks out his new iPhone 7 Plus at the Apple Store on Michigan Avenue, in Chicago. Apple's iPhone 7 Plus is getting a new camera capability: the blurring of backgrounds to focus attention on people in the foreground.

Apple first announced the 'portrait mode' feature in September but it wasn't available until the company released its iOS 10.1 software update Monday.

It replicates an effect typically limited to larger cameras known as SLRs.

While SLRs accomplishes this by controlling how wide the lens opens, the iPhone uses software adjustments.

Portrait mode requires an iPhone 7 Plus because it uses the phone's two lenses to sense depth.

Other iPhones have only one camera lens.

The software update will still be available for other iPhones because it also comes with bug fixes and other improvements.

The update also adds a new camera capability for the iPhone 7 Plus — the blurring of backgrounds to focus attention on people or other objects in the foreground.

To use the feature, slide the mode at the bottom of the camera app to 'portrait.' It's between 'photo' and 'square.'

Then take a few steps back, as the feature taps the zoom on the iPhone 7 Plus's second lens, meaning images are enlarged two-fold.

The screen will guide you to move closer or farther from the subject, or in some cases, find a setting with more light.

When shooting multiple people, make sure everyone's the same distance from the camera to keep them all sharp.

A customer sets up his new iPhone 7 Plus, right, as he switches from an iPhone 6 at the Apple Store on Michigan Avenue during the release of the Apple iPhone 7 and the latest Apple Watches, in Chicago.

Apple is calling this depth-effect feature a beta, which means it's a work in progress. The iPhone will also save the unadjusted shots by default.

Huawei's dual-lens P9 phone also has a similar feature.

The update comes three days before Apple holds a product event in Cupertino, California, during which the company is expected to unveil new Mac computers.

Separately, Apple announced Monday that a Nike edition of Apple Watch will come out Friday, starting at $369.