A secret part of Apple's iPhone software has been posted online in a leak that could potentially allow hackers to find security holes in the smartphone.

Although the release does not immediately put iPhone owners at risk, security experts said the leak enables hackers to analyse Apple's code, replicate and manipulate it for malicious purposes and that users could be vulnerable in the future.

On Wednesday night, an anonymous user published part of the "source code" - the computing instructions that underpin the iOS software - on GitHub, a website for computer programmers to share code.

The leak relates to iOS 9, a three-year-old version of the software, but security researchers claimed that the components are likely to remain in the latest software update.